Free Pascal Help

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
I've been learning Pascal (we use Free Pascal) for a while, and I've got some questions here:

1) At some point I was trying to compile a really simple, even just a few lines (just checking something) but it always returned an error message: "Error: Error while Linking"

Anybody knows what it is? How to solve it?

2) I haven't found a function to convert an integer into string or vice versa.
What are they?

Thanks.

EDIT:
Turns out that my folder which contained Free Pascal was named "PascalFree" and then I renamed it to "Pascal Free" and the first problem was solved.
What's the meaning of this?
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
I've been learning Pascal (we use Free Pascal) for a while, and I've got some questions here:

1) At some point I was trying to compile a really simple, even just a few lines (just checking something) but it always returned an error message: "Error: Error while Linking"

Anybody knows what it is? How to solve it?

2) I haven't found a function to convert an integer into string or vice versa.
What are they?

Thanks.

EDIT:
Turns out that my folder which contained Free Pascal was named "PascalFree" and then I renamed it to "Pascal Free" and the first problem was solved.
What's the meaning of this?

I believe, those functions you seek are:
1. http://www.delphibasics.co.uk/RTL.asp?Name=StrToInt
2. http://www.delphibasics.co.uk/RTL.asp?Name=IntToStr

And Free Pacal is a little bit.. strange to work with.
You'ed have to configure it then it works.

However, you'd probably be better off with another IDE.


Also, a great way to learn your "Pascal" is done with "Scar DIVI"
It is a macro program that executes pascal ( delphi ) scripts.
 

Sintoras

Shaaakaa!
Reaction score
45
I'd try Delphi. Same thing but newer.

The thing with linker, I guess there was a file which the linker needed in that folder, the path was probably hardcoded so it just didn't find the file--> error.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
Do Delphi functions work in Free Pascal?
Or they are 100% the same thing?

Thanks guys.
Never knew why I didn't think of searching using Google o_O
 

Monovertex

Formerly Smith_S9
Reaction score
1,461
Late answer, but no, those functions Themis linked are not supposed to work in Pascal. I mean, Pascal != Delphi. Maybe there are a lot of syntax similarities, but that doesn't makes them the same.
 

enouwee

Non ex transverso sed deorsum
Reaction score
240
Code:
PROGRAM Test;

VAR str    : String[32];
    i, pos : Integer;

BEGIN
Writeln('Enter something, preferably a number:');
Readln(str);

Val(str, i, pos);
IF (pos <> 0) THEN
  Writeln('That wasn''t a number!')
ELSE BEGIN
  Write('Your input as integer: ');
  Write(i);
  Writeln
END;

END.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
Smith_S9 said:
but that doesn't makes them the same.

Explains why StrToInt() and IntToStr() returned an error XD

What is the third parameter in val() actually? (in this case, 'pos')
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
Late answer, but no, those functions Themis linked are not supposed to work in Pascal. I mean, Pascal != Delphi. Maybe there are a lot of syntax similarities, but that doesn't makes them the same.

There is little to no difference between Delphi and "Object Pascal".
Pascal is merely a scripting language but was later improved to an object orientated language called "Object Pascal", then sometime later they changed the name to Delphi.

As for the IDE you're better of using CodeGear Delphi.

Also..
Code:
  writeLn('Your input as integer: '  + IntToStr( i ) + '.' + chr( 32 ) );
 

Monovertex

Formerly Smith_S9
Reaction score
1,461
You know, he is asking about Pascal, not Object Pascal.

There is no such function as IntToStr in Pascal. I have no idea about this Object Pascal, though.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top