Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

(Ovid) RE(2): What was your first program?

by Ovid (Cardinal)
on Nov 13, 2000 at 21:18 UTC ( [id://41350]=note: print w/replies, xml ) Need Help??


in reply to RE: What was your first program?
in thread What was your first program?

I remember writing one of those adventure games, too! The only problem was that I didn't want to be stuck with a simple two-word command. I wanted full "Zork sentence" capability. My program would scan through the input and take the first three letters of every word (limited memory) and match those up with the words in DATA statements. My test sentence (my dog, I remember it after 15 years!) was "hit the skeleton with the sword, take his ring and then walk north and touch the altar." It took 8 seconds for the BASIC program to parse that into numbers. Then, the program would branch to various parts of the program when it had a "verb" number and apply the action (if possible) to the "noun" number.

Since 8 seconds was too long for the program to parse the input string, I tought myself a little 8088 assembler and rewrote the routine in about a week. My goal was to get the program to start recognizing adjectives and compound-complex sentences, but then my roommate moved and took his computer with him. I didn't touch a computer again for another 9 years.

It's good to be back :)

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just go the the link and check out our stats.

  • Comment on (Ovid) RE(2): What was your first program?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://41350]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-25 13:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found