Jump to content

need help on pascal code.

- - - - -

  • Please log in to reply
3 replies to this topic

#1
xerox601

xerox601

    Newbie

  • Members
  • Pip
  • 1 posts
hi guys. i am new to this forum. I hope you guys gonna help me out. i am porting pascal code to c++. i don't have any knowledge on pascal code. This is my first and last code on pascal. your help will be lot to me. so here are questions. What is the equivalent to c++ on this pascal code.
i. e.g. if x in [0..max_num] then

ii. x[i]^.id

iii. <>

still more but need to know those things first. thank you.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
if x in [0..max_num] then :: if x>=0 and x<=max_num
x[i]^.id :: x[i]->id (I think)
<> :: !=
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
bbqroast

bbqroast

    Codecall Addict

  • Members
  • PipPipPipPipPipPipPip
  • 554 posts
  • Location:/etc/passwd

int main() {

    int i=0;

    int maxnumber=10;

    while(maxnumber>i){

         Errr... I have no Idea what goes here... Don't know Pascal, could you explain what it does??

       

       

    }

}


Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
It depends on what you're trying to do in your while loop.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users