Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
Chemistry
Biology and Medical
Earth Sciences
Computer Science
Computing and Technology
DIY Projects
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
Chemistry
Biology and Medical
Earth Sciences
Computer Science
Computing and Technology
DIY Projects
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Other Sciences
Computing and Technology
Pascal: Questions on Variables, Arrays & Booleans
Reply to thread
Message
[QUOTE="Mark44, post: 6163621, member: 147785"] Very late reply in case others have similar questions... Pretty much. I like to define a variable as a memory location that is named. The actual size of the memory depends on the type used when the variable is declared. Yes. The program code evaluates the expression 3*x + 5 by using the current value of x. Yes It's been a very long time since I wrote any Pascal code, but I believe that all of what you wrote is mostly correct. One difference between Pascal and languages derived from C is that Pascal uses = for comparison and := for assignment, which C etc. use == for comparison and = for assignment. The only thing I see wrong is "while check do ...". This should be "while (check) do ..." Yes. If check is a Boolean variable, then check = false is a Boolean expression that could be true or false, depending on the value of check. Yes, assuming that the type of the array is integer. In that case, each cell of the array is an integer. Yes. As long as the actual arguments (ar[1] and ar[5]) are the right type, they would match the formal parameters, both of which are type integer. Keep in mind though, that the var prefix suggests that the second parameter is an "out" parameter, and can have its value changed. [/QUOTE]
Insert quotes…
Post reply
Forums
Other Sciences
Computing and Technology
Pascal: Questions on Variables, Arrays & Booleans
Back
Top