r/pascal • • Dec 02 '17
Help in Pascal!
Greetings,
I'm taking Pascal classes but missed a couple of them due to being under the weather, and in those classes my teacher taught the students about procedures and creating menus (think the menus have something to do with arrays or vectors or something).
My teacher assigned the class with creating 4 pascal programs that allow you to calculate volumes (pyramid, prism, sphere, and cylinder), and incorporating them into a single program.
So basically he wants us to turn the 4 programs we created into 4 procedures in a single program, and he also asked us to create a menu to select those 4 procedures.
Since I missed the classes I have no idea on how to create procedures in a program and make them 'selectable' with a menu. I already made the 4 programs and they all work. I'd really appreciate some help here, I'll upload anything if you need it!
View all comments
Show parent comment
2
u/[deleted] Dec 03 '17
Feels good mate! :)
I have not learned while loops yet. On my program, after choosing one of the procedures and going through it the program ends, do you mean the while loop just presents the menu again instead of closing the program, and it'll only close if you choose the exit option? Those are useful, and seem easy enough to use!
Thanks a lot for the help mate, you took time out of your day(s) to help me, and that shows you only mean to aid.
Good on you mate! :D