Results 1 to 4 of 4

Thread: Pascal?

  1. #1

    Thread Starter
    Hyperactive Member Arachnid13's Avatar
    Join Date
    Jan 2003
    Location
    England
    Posts
    327

    Pascal?

    Hi,
    I am well experienced in visual basic and have recently come across a competition which unfortunately only accepts entries written in pascal... what are the similarities between pascal and vb? as i know they are similar but i dont know how much... also are there any good sites where i can find a tutorial that covers most aspects of pascal?

    thanks
    Do you wake up in the morning feeling sleepy and grumpy? Then you must be Snow White

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Pascal?

    The keywords are similar. But they do not require the use of white space to separate statments, instead they use begin, end and semi colons. White space is allowed of course and recommended.
    VB Code:
    1. If condition Then
    2.   statements
    3. End If
    4.  
    5. If condition Then
    6.   statements
    7. Else
    8.   statements
    9. End If
    10.  
    11. If condition OR condition Then
    12.   statements
    13. End If
    14.  
    15. For var = 1 To 10
    16.   statements
    17. Next var
    18.  
    19. While condition
    20.   statements
    21. Wend
    22.  
    23. Do While Condition
    24.   statements
    25. Loop
    26.  
    27. Do
    28.   statements
    29. Loop Until condition

    Pascal
    Code:
    if condition then
    begin
      statements;
    end;
    
    if condition then
    begin
      statement;
      statement;
    end
    else
    begin
      statements;
    end;
    
    
    if (condition) OR (condition) then
    begin
      statements
    end;
    
    for var := 1 to 10 do
    begin
      statements;
    end;
    
    for var := 10 downto 1 do
    begin
      statements;
    end;
    
    while condition do
    begin
      statements;
    end;
    
    reapeat
      statements;
    until; condition;
    Pascal also has an assignment operator as well as an equality operator. Hence the following code assigns the value of a to be:

    b := a;

    Where as this tests whether a is equal to b:

    a = b;
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: Pascal?

    Quote Originally Posted by Arachnid13
    Hi,
    I am well experienced in visual basic and have recently come across a competition which unfortunately only accepts entries written in pascal... what are the similarities between pascal and vb? as i know they are similar but i dont know how much... also are there any good sites where i can find a tutorial that covers most aspects of pascal?

    thanks
    I THINK pascal is kinda obsolete and useless nowadays, I wouldnt recomment learning it
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Pascal?

    Quote Originally Posted by MrPolite
    I THINK pascal is kinda obsolete and useless nowadays, I wouldnt recomment learning it
    Well Delphi is still going strong and as Object Pascal is the underlaying lagnague of Delphi, I would say its yet to become obsolete.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width