Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23

Thread: Pascal - What is the use?

  1. #21
    Join Date
    Oct 2010
    Posts
    63
    Rep Power
    0

    Default

    it says in the wiki that it means that one should expect to put a variable there... so its more of a aid than a hinder and it is in some weird way relevant...
    var age : byte;

    begin../...
    age:= 12;

    remember that it is the simplest language out there and is aimed at beginners... yh the syntax is a bit crappy and the data types are drab but its ok... as i said before... it has as much functionality as C... its only lacking Object Oriented Programming(classes../..).

    alot of pascal code can be translated to C++ and it was my knowledge of C/C++ that made pascal a breeze to learn... its handles are simpler than C/C++ (picture this_

    #Pascal
    Uses Crt; //calls on the graphics..//..
    clrscr; //clears the screen

    #C++
    // clears the screen(hideously long function that clears the entire dos window and brings the cursor back to the default position)

    void clrscr(char character); //function header

    void clrscr(char character) //function itself
    {
    HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); //calls the graphics...
    COORD coordScreen = {0, 0};

    DWORD cCharsWritten;
    CONSOLE_SCREEN_BUFFER_INFO csbi;
    DWORD dwConSize;

    GetConsoleScreenBufferInfo(hConsole, &csbi);
    dwConSize = csbi.dwSize.X * csbi.dwSize.Y;

    FillConsoleOutputCharacter(hConsole, (TCHAR) character,
    dwConSize, coordScreen, &cCharsWritten);

    GetConsoleScreenBufferInfo(hConsole, &csbi);

    FillConsoleOutputAttribute(hConsole, csbi.wAttributes,
    dwConSize, coordScreen, &cCharsWritten);

    SetConsoleCursorPosition(hConsole, coordScreen);
    }

    and i could go on and on... just leave pascal alone... its for noobs
    ► with me... now ■ and think...

  2. #22
    Join Date
    Jan 2006
    Posts
    74
    Rep Power
    0

    Default

    Delphi is the best for me so far.
    Proven Jamaican Point Of Sale Software http://www.lintechsystems.net/

  3. #23
    Join Date
    Jul 2002
    Posts
    1,395
    Rep Power
    0

    Default

    Quote Originally Posted by Skele Drew View Post
    I think the syntax is a nightmare. Why := when you can easily use = which makes more sense?
    Saw similar syntax in Google Go. It allow to declare and use a variable in the same breath.

    http://tour.golang.org/#12

    They call it short assignment.

Posting Permissions

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