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
SuperBASIC
(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!
== Example == AUTO 11,2 DEFine FN Iso(S,O) LOCal y%,m%,d%,i$,n%,w% REM Step 0 - to isolate components of date-stamp S="YEARMoDa" LET y%=S(1TO 4) : m%=S(5TO 6) : d%=S(7TO 8) REM Step 1 - to initiate [[Determination of the day of the week#Keith|Lachman's Congruence]]<ref>{{Citation |title=Motorola 68000 |date=2023-01-11 |url=https://en.wikipedia.org/w/index.php?title=Motorola_68000&oldid=1132884334 |work=Wikipedia |language=en |access-date=2023-02-06}}</ref> LET i$=m%*2.56+ 193 : S=S(1TO 6)- 3 REM Step 2 - to compute the day-number within the week LET w%=(S(1TO 2)&"32"DIV 16+ S(1TO 4)DIV 4+ y%+ i$(2TO 3)+ d%)MOD 7 REM Step 3 - to return result SELect ON O ON O= 5 : n%=i$(2TO 3) ON O= 4 : n%=y% ON O= 3 : n%=m% ON O= 2 : n%=d% ON O= 1 : n%=w% ON O= REMAINDER : n%=-1 END SELect RETurn n% REM data statements DIM weekdays$(6,3) RESTORE 190 FOR count=0 TO 6 : READ weekdays$(count) {{keypress|ctrl|space}} <syntaxhighlight lang="basic"> 100 DIM month$(12,9) 110 RESTORE 120 REM QL User Guide's "Data Read Restore" example ii 130 REM appropriately amended relative to example i 140 FOR count=1 TO 12 : READ month$(count) 150 DATA "January","February","March" 160 DATA "April","May","June" 170 DATA "July","August","September" 180 DATA "October","November","December" 190 DATA "SUN","MON","TUE","WED","THU","FRI","SAT" 199 END DEFine Iso </syntaxhighlight>
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)