VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Aug 2000
    Location
    Ca, Irvine, USE
    Search PM
    Hello, im using a program called Turbo Pascal and I was wandering if any of you know the answers to these questions:

    1. Why is it best to write programs using both functions and procedures verses writing everything in the mainline?

    2. Why do we use the Randomize statement in a program?

    3. Where can you assign values to variables?
    Quote Quote  
  2. Member
    Join Date
    Oct 2001
    Location
    jasperpso
    Search PM
    1. because you can write a procedure only once and call it unlimited times from the MAIN program code
    2. You would use randomize in many ways, one would be if you wanted a card game to give you a random card [i once wrote a SLBBS blackjack door game, for those who are familiar], or for instance i once wrote a dos based screensaver that randomly found points for fireworks explosions to appear on screen.
    3. you define constants in the beginning of the main code or in a procedure. variables are assigned by either a 'readln' statement for a user response or as a definition statement in the code.
    I am rusty at pascal, been 4-5 years since i have written a line of code to be honest, but since i was mostly self tought until i took some pascal classes in college i can tell you that reading source code of existing programs is the best way to learn, but i must admit in the days of DOS things were a bit simpler to just pick up. Hang in there, you'll get it.. BTW there are MANY books on teching yourself the language... C++ may be more useful in todays age though
    Quote Quote  
  3. Member
    Join Date
    Aug 2000
    Location
    Ca, Irvine, USE
    Search PM
    thanks for the info jasper!



    <font size=-1>[ This Message was edited by: TDUBB on 2001-10-18 00:30:18 ]</font>
    Quote Quote  
  4. Member
    Join Date
    Oct 2001
    Location
    gateway to the west
    Search Comp PM
    Hey, jasperpso, wow I haven't heard "door game" in quite awhile. LOL. I didn't even think there was anyone that remembered what we use to do before the internet. LOL.
    So would it work with wwiv, vbbs, wildcat, or all of the above?

    LOL

    have a great one,
    TW

    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!