Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / My first real good code!

Author
Message
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 21st Dec 2002 06:25
Sure, it is very small and dull. But, it is my first good code I've made. I normally, actually, havent really been making codes, so I started today and got this. When you press the down key it says something in english and when you push the up key it says the same thing, only in spanish! here is the code:



NOTE: The right side of this is freaked up. Dont worry about it, though.
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 21st Dec 2002 21:38
that code has a few problems, the biggest being that SYNC ON is supposed to go BEFORE the loop, and in the loop you need the command SYNC if you are trying to control the refresh rate.

You don't need the else in the boolean statement, it would be cleaner to make it 2 lines.

You set 2 variables that you never use, downkey and upkey.

And the two waits are arbitrary because they are never encountered. There is no way to leave the do loop.
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 22nd Dec 2002 01:14
Yeah, I know, but it was my first code.

Login to post a reply

Server time is: 2024-04-26 22:06:05
Your offset time is: 2024-04-26 22:06:05