Results 1 to 8 of 8

Thread: Pascal Questions and issues

  1. #1
    Join Date
    Sep 2009
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Pascal Questions and issues

    I have started Pascal scripting using Free Pascal. However, I'm having a hard time with it since it has no line numbers, won't take copypastes from other programs and generally sucks. Is there a better IDE/Compiler out there for Pascal? And what other programming language could be suited to writing programs in console? Python is out because it won't make windows .exes.

    Last but not least, I have written the following piece of code which won't compile, resulting in a less-than-helpful "Fatal : compilation aborted" error. Can you help me find what's wrong with it?

    Code:
    function IntToStr(Int : integer) : string;
    var
      S : string;
    
    begin
      Str(Int, S);
      IntToStr := S;
    end;
    
    procedure WriteTXT(Data, Value : String);
    var
      S : string;
      TXTIn, TXTOut : text;
      i : integer;
      TheBoolean : Boolean;
    
    begin
      TheBoolean := False;
      Assign(TXTIn, 'C:/Users/CARLPP/DeskTop/TEXT.TXT');
      Reset(TXTIn);
      Assign(TXTOut, 'C:/Users/CARLPP/DeskTop/TEXT.TMP');
      Rewrite(TXTOut);
      while not EOF(TXTIn) do
      begin
        Readln(TXTIn, S);
        for i:= 0 to High(Data) do
        begin
          TheBoolean := S[i] = Data[i];
          if not TheBoolean then Break;
        end;
        if TheBoolean then S := Data+'='+Value;
        Writeln(TXTOut, S);
      end;
      Close(TXTIn);
      Close(TXTOut);
    end;
    
    begin
    end.
    I don't check this place often, sorry.

    Currently working on - Software Engineering degree. Thank you SRL for showing me the one true path

  2. #2
    Join Date
    Apr 2007
    Location
    Australia
    Posts
    4,163
    Mentioned
    9 Post(s)
    Quoted
    19 Post(s)

    Default

    http://www.py2exe.org/

    Python would be my choice

  3. #3
    Join Date
    Sep 2009
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Cigue View Post
    Python is out because it won't make windows .exes.
    Quote Originally Posted by The Claw View Post
    Python would be my choice
    I don't check this place often, sorry.

    Currently working on - Software Engineering degree. Thank you SRL for showing me the one true path

  4. #4
    Join Date
    Apr 2007
    Location
    Australia
    Posts
    4,163
    Mentioned
    9 Post(s)
    Quoted
    19 Post(s)

  5. #5
    Join Date
    Sep 2009
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Now that's pretty cool! Where should I go to start learning Python?
    I don't check this place often, sorry.

    Currently working on - Software Engineering degree. Thank you SRL for showing me the one true path

  6. #6
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    What line is the error on?
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  7. #7
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Verrekte Koekwous

  8. #8
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by mastaraymond View Post
    This. ^



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •