Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
TI-BASIC
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Functions === ==== TI-83/84 (Z80) ==== The Z80 version of TI-BASIC makes explicit "functions" like those in 68k impossible. However, all variables are global so functions can be emulated by setting variables, similar to arguments, before calling another program. Return values do not exist; the <code>Return</code> statement stops the current program and continues where the program was called. ==== TI-89 (68k) ==== The 68k version of TI-BASIC allows creating user-defined functions. Functions have the same syntax as programs except that they use the <code>Func</code>...<code>EndFunc</code> keywords instead of <code>Prgm</code>...<code>EndPrgm</code>, and that they are not allowed to use instructions that perform I/O, modify non-local variables, nor call programs. However, functions can still be non-[[pure function|pure]] because they can call built-in functions such as <code>getTime()</code>, <code>getKey()</code>, or [[pseudorandom number generator|<code>rand()</code>]]. All functions have a return value, which in the absence of an explicit <code>Return</code> statement is the last expression evaluated.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)