Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
Calculator Community
»
Other Calc-Related Projects and Ideas
»
TI 68K
»
89 Basic Tutorial
« previous
next »
Print
Pages:
1
[
2
]
3
4
...
6
Go Down
Author
Topic: 89 Basic Tutorial (Read 22285 times)
0 Members and 1 Guest are viewing this topic.
mdjenkins86
LV5
Advanced (Next: 300)
Posts: 235
Rating: +0/-0
89 Basic Tutorial
«
Reply #15 on:
June 17, 2005, 07:37:00 pm »
Chapter 2: A closer look at input functions.
Online dating services are designed to match up the perfect guy with the perfect girl, or guy or whatever?anyway, when you go to such websites and fill out or input your information, you are asked certain question. To these questions, there is only a certain amount of possible answers (for example: are you a girl, guy, cheese steak, meatball sandwich?are you seeking a girl, guy, cheese steak or meatball sandwich?). If the dating program is any good, it will make sense of your desires and try to obtain more specific input. Input is, according to answers.com something put into a system or expended in its operation to achieve output or a result. In the case of the dating service, the output would be your date, or sandwich.
In 89 Basic, there are several different ways to acquire input from the user. The functions that will be explored in this chapter are Input and InputStr. The Dialog Box input functions will be included throughout the variable chapters.
Enter the program editor and press 3 to create a new program. Name this program ?Inputut?. Enter the program below as shown:
Inputut()
Prgm
Disp ?How good is this tutorial?, ?On a scale of 0 to 10?
Input ?Number?, x
DispHome()
Return
EndPrgm
Type in ?x? on the home screen without the quotes and you will how good you think this tutorial is. Now type GetType(x). This will return the type of variable x is. Don?t worry so much about that right now. Just remember that whatever reply you supply for input is stored as a numerical expression. That means that only numbers, and words that are numbers, can be accepted using input. If you wanted to get a response that wasn?t a number, such as a name or birthplace, you would use InputStr instead of Input:
Inputnm()
Prgm
Disp ?My name is Desmond Jenkins?, ?What is yours?
Inputstr ?My Name?, x
DispHome()
Return
EndPrgm
When you perform, GetType(x) you will notice that x is type ?STR?. This means that the users input has been turned into a string. A string is an array of characters. In other words, a string is something in quotes. A literal.
Focus: Expressions
In math x can be equal to a number. Say 5. X=5. This means that x is an expression that is equal to 5. Now y can be set to x. This means that y=x=5.
In programming this is also true. In the first example when you used Input ?Number?, x, the number that the user inputs is an expression (numerical value) from 1 to 10. X is set to that input. Therefore, x is equal whatever the person enters, say 5. Variable X is now an expression, which is equal to 5.
Focus: Strings
In English, when you quotes someone, you use ?? quotation marks. When you use quotation marks to quotes someone, you are repeating word for word what that person said. You do this even when you quote yourself.
Desmond said, ?Programming is fun?, but nobody believed him.
?Programming is fun?, is an example of a literal because it is something that I literally said.
When the processor looks at your code, it will inherently try to quantify everything try typing Disp Programming is fun see what kind of error you get. You see without the quotes, the calculator thinks that Programming is a variable name and then discovers that it couldn?t be because the file name is too long. Try typing Disp ?Programming is fun?. This works because the calculator understands that Programming is fun is what you literally want to display, not some expression stored in a variable.
Chapter Review:
What is the difference between Input and InputStr?
What is a string?
What is an expression?
Definitions
Concept of Expression ?EXPR? A mathematical variable or number. On the 89 the ?Type? of variable that a number is or a variable that contains a number.
Concept of Strings ?STR? A quote. A literal. This is how you tell the calculator to display exactly what you want, without trying to quantify it. Remember to use quotation.
GetType Evaluates what type of system type a given variable is. Try GetType(hellowd) GetType(45)
Input Used to scan expressions from the user
InputStr Used to scan strings from the user
DispHome Return to the home screen, program is still active.
Return The easiest and safest way to exit a program or function.
The executon will pick up where you left the previous program. When you use this in a function, you can return values.
Stop Full Stop. End of code execution. Dangerous. Avoid at all costs.
Extra Program: Intermediate
Info()
Prgm
ClrIO
Disp ?My name is Desmond Jenkins?, ?What is yours?
Inputstr ?My Name?, x
Input ?How old are you?, y
ClrIO
Disp ?Okay?, ?Your name is ?, x, ?and you are ?, string(y)&? Years old.?
Logged
mdjenkins86
LV5
Advanced (Next: 300)
Posts: 235
Rating: +0/-0
89 Basic Tutorial
«
Reply #16 on:
June 18, 2005, 07:32:00 am »
Any Thoughts, Questions, Input?
Logged
DJ Omnimaga
Clacualters are teh gr33t
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
89 Basic Tutorial
«
Reply #17 on:
June 18, 2005, 08:50:00 am »
Very nice so far, I like how the tutorial is written
Logged
tifreak
LV11
Super Veteran (Next: 3000)
Posts: 2708
Rating: +82/-3
My Kung Fu IS strong...
89 Basic Tutorial
«
Reply #18 on:
June 18, 2005, 10:14:00 am »
Very well written. I do have permission to post them on my site, correct?
Logged
Projects: AOD Series: 75% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%
mdjenkins86
LV5
Advanced (Next: 300)
Posts: 235
Rating: +0/-0
89 Basic Tutorial
«
Reply #19 on:
June 18, 2005, 07:44:00 pm »
Sure
Logged
tifreak
LV11
Super Veteran (Next: 3000)
Posts: 2708
Rating: +82/-3
My Kung Fu IS strong...
89 Basic Tutorial
«
Reply #20 on:
June 19, 2005, 04:25:00 am »
Sweet. I shall let you know when things are set up, and see how well you like them.
Logged
Projects: AOD Series: 75% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%
DJ Omnimaga
Clacualters are teh gr33t
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
89 Basic Tutorial
«
Reply #21 on:
June 19, 2005, 04:41:00 am »
Will there be an off-line version? If so I might include it in the archives here once finished, if not I am thinking about creating a topic will all chapters in the Community articles section or a pinned topic in the help and support section
Logged
tifreak
LV11
Super Veteran (Next: 3000)
Posts: 2708
Rating: +82/-3
My Kung Fu IS strong...
89 Basic Tutorial
«
Reply #22 on:
June 19, 2005, 05:10:00 am »
Well, it will be a few days before I can get them posted, as I am writing an article for the BASIC Elite...
It is about the many forms of hit detection, used for games the require maps, and uses ascii graphics...
Logged
Projects: AOD Series: 75% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%
DJ Omnimaga
Clacualters are teh gr33t
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
89 Basic Tutorial
«
Reply #23 on:
June 19, 2005, 05:20:00 am »
Cool to see game making help in a tutorial, most I've seen only explains the language BASICs
Logged
tifreak
LV11
Super Veteran (Next: 3000)
Posts: 2708
Rating: +82/-3
My Kung Fu IS strong...
89 Basic Tutorial
«
Reply #24 on:
June 19, 2005, 05:29:00 am »
Well, I am trying to add something new to the newsletter...
Logged
Projects: AOD Series: 75% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%
DJ Omnimaga
Clacualters are teh gr33t
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
89 Basic Tutorial
«
Reply #25 on:
June 19, 2005, 05:33:00 am »
btw talking about newsletter, anybody have heard about any progress lately about the CRPGN, Theta fourtheen and CDI projects lately? I hope they arent dead
Logged
tifreak
LV11
Super Veteran (Next: 3000)
Posts: 2708
Rating: +82/-3
My Kung Fu IS strong...
89 Basic Tutorial
«
Reply #26 on:
June 19, 2005, 05:46:00 am »
I have been wondering the same. I figure he has been busy... We shall just have to wait and see.
Logged
Projects: AOD Series: 75% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%
mdjenkins86
LV5
Advanced (Next: 300)
Posts: 235
Rating: +0/-0
89 Basic Tutorial
«
Reply #27 on:
June 19, 2005, 07:04:00 am »
QuoteBegin-Kevin+June 19, 2005, 10:41-->
QUOTE
(Kevin @ June 19, 2005, 10:41)
Will there be an off-line version? If so I might include it in the archives here once finished, if not I am thinking about creating a topic will all chapters in the Community articles section or a pinned topic in the help and support section
The tutorial is offline. I just copied and pasted it to the post. That's why I always say 'Without Formatting', because all the effects and tables and formatting used aren't translated when I post. When I finish the tutorial I will let you have the offline formatted version.
Logged
DJ Omnimaga
Clacualters are teh gr33t
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
89 Basic Tutorial
«
Reply #28 on:
June 19, 2005, 07:09:00 am »
Cool.
Well actually I have the ability to post HTML in the News section but I never got that to work like I wanted
Logged
mdjenkins86
LV5
Advanced (Next: 300)
Posts: 235
Rating: +0/-0
89 Basic Tutorial
«
Reply #29 on:
June 19, 2005, 07:11:00 am »
Thats why I love FrontPage.
Logged
Print
Pages:
1
[
2
]
3
4
...
6
Go Up
« previous
next »
Omnimaga
»
Forum
»
Calculator Community
»
Other Calc-Related Projects and Ideas
»
TI 68K
»
89 Basic Tutorial