it is really easy

Code:
:Input "name:",Str1
:clrHome
:Disp "Hello",Str1
:Pause
:clr
:Goto GM

Here is how to save the game

Code:
:Lbl SD
:ClrHome
:Disp "saving..."
:A->H
:B->I
:C->J
:D->K
:E->L
:F->M
:G-N
:Str1->str2
:Disp "Saved"
:Goto GM


and here is where you load the game


Code:
:Lbl LD
:Disp "Loading..."
:N->G
:M->F
:L->E
:K->D
:J->C
:I->B
:H->A
:Str2->Str1
:Disp "Loaded"
:Pause
:ClrHome
:Goto GM
Well, here are a couple of comments on that code Very Happy

In general, the Goto and Lbls will make the code very slow and may cause memory errors. I would definitely remove them.


Code:
:Input "name:",Str1
:clrHome
:Disp "Hello",Str1
:Pause
:clr
:Goto GM


This is fine, but I don't personally recommend using strings to store names because there is a limited number of strings.


Code:
:Lbl SD
:ClrHome
:Disp "saving..."
:A->H
:B->I
:C->J
:D->K
:E->L
:F->M
:G-N
:Str1->str2
:Disp "Saved"
:Goto GM


You don't need ending quotations and I would recommend lists to store variables for saving because custom lists are much less likely to be used by someone else.


Code:
:Lbl LD
:Disp "Loading..."
:N->G
:M->F
:L->E
:K->D
:J->C
:I->B
:H->A
:Str2->Str1
:Disp "Loaded"
:Pause
:ClrHome
:Goto GM


Same here as for the saving part - lists are better.
here is one comment I have also. I am not trying to be mean here, but you are preaching to the choir here.
indeed, You may want to check the other topics ect, you will realize 99.9% of members know how to do this... also, welcome to Cemetech!
Pseudoprogrammer wrote:
indeed, You may want to check the other topics ect, you will realize 99.9% of members know how to do this... also, welcome to Cemetech!
The other .1% are bots Very Happy

Welcome to Cemetech. Looks like you're interested in programming, take a look around and ask any questions you have. We could also recommend a few guides should you want to better learn Basic or ASM (or any other computer language for that matter).
wow, thanks for wasting my time with a glorified "Hello, world!" program. (of which there is already a list of 314 programming language examples and 52 human languages here: http://www.roesler-ac.de/wolfram/hello.htm ) Next time just skip straight to the part where you run full speed into a tree, please.
Kllrnohj wrote:
Next time just skip straight to the part where you run full speed into a tree, please.

Shock

Thats all I have to say at that. I find that actually humourus at the moment. Laughing

I agree with b-flat and rivereye is spot on with that comment.
A continuation of b-flats post though, instead of Lbl's and goto's, use the 'While' Function. Look it up in your guide book and expierment with it. Its exactly the same as Lbl's & goto's if used properly and don't cycle through the whole program when its time to switch code segments. Though, using the While is harder. Let you figure it all out mate Wink

Welcome and ignore this first impression, in general =P
Guys don't be mean...i'm sure that at one time none of us realized that there might have been easier ways to do things. I know I certainly did as a 7th grader. I was so proud of myself for the programs I had made. Now I realize the amount of flaws I made. Don't knock him...help him. Welcome blm22. As said before take note all or most of the programmers here are experienced programmers. You will learn many things from each and every one of us.
Kllrnohj wrote:
wow, thanks for wasting my time with a glorified "Hello, world!" program. (of which there is already a list of 314 programming language examples and 52 human languages here: http://www.roesler-ac.de/wolfram/hello.htm ) Next time just skip straight to the part where you run full speed into a tree, please.
For once I rofled at noob-bashing.

Welcome, blm22; we're happy to have you here at Cemetech to shape and mold into a more 1337 programmer. May I suggest two particular tutorials?

http://www.cemetech.net/projects/btutor
http://www.ticalc.org/archives/files/fileinfo/369/36993.html
some18kanal0n3 wrote:
Thats all I have to say at that. I find that actually humourus at the moment. 0x5


psst... it was supposed to be funny Wink

Re people defending him (which I guess is everyone so far...): Do realize I'm not bashing him or his program, but rather his apparent need for our approval and that he thinks that everyone actually cares what he made. Its not cool, its not unique, and it doesn't come even close to deserving a thread (much less one written in "how-to" form, as if there is anyone who actually wants to do this same thing....). It was presented in a "this is the coolest thing ever" manner, hence the way I responded Smile
Defending him? I didn't see anyone defending him; I saw everyone amicable mocking his apparent sense of self-worth in pointing out a chunk of code I moved past a good 7 years ago, and most of you surpassed just as early in your programming careers.
Quote:
Guys don't be mean...i'm sure that at one time none of us realized that there might have been easier ways to do things. I know I certainly did as a 7th grader. I was so proud of myself for the programs I had made. Now I realize the amount of flaws I made. Don't knock him...help him. Welcome blm22. As said before take note all or most of the programmers here are experienced programmers. You will learn many things from each and every one of us.


that may be considered defensive. btw Kerm im reading all of those tutorials you suggested to him. sometimes i like to go over the basics ect. just helps...
-.-

You know... This is sad. We used to bash other forums for bashing on the n00bs, and now here everyone is, with the exception of a few people, bashing on n00bs.

So what he made this post. If you didn't like it, ignore it. If you do not have anything nice to say, than keep quiet.
Pseudoprogrammer wrote:
Quote:
Guys don't be mean...i'm sure that at one time none of us realized that there might have been easier ways to do things. I know I certainly did as a 7th grader. I was so proud of myself for the programs I had made. Now I realize the amount of flaws I made. Don't knock him...help him. Welcome blm22. As said before take note all or most of the programmers here are experienced programmers. You will learn many things from each and every one of us.


that may be considered defensive. btw Kerm im reading all of those tutorials you suggested to him. sometimes i like to go over the basics ect. just helps...
Cool deal. Had you ever read either before? Oh, and the second link is by no means a "basics" tutorial - foundations, maybe, but definitely not basics
Going through the first one now, might you add more on strings, like all they are cabable of. not just storing some text.
Cool deal. And I just want to reiterate that while Cemetech does not condone abusive posts towards members, free speech is upheld as much as possible.
Just as long as they aren't too bad right?

Btw, my comment was not meant to be mean, just a stating of the facts.
tifreak8x wrote:
You know... This is sad. We used to bash other forums for bashing on the n00bs, and now here everyone is, with the exception of a few people, bashing on n00bs.


*pssst* you have that backwards, other sites used to bash this site for bashing n00bs - so basically nothing has changed *psst*
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement