home *** CD-ROM | disk | FTP | other *** search
RISC OS BBC BASIC V Source | 2003-09-21 | 943 b | 33 lines |
- test calendar
- $ " at line "
- "Test 1: Convert to JDay and back. Show registers."
- )atod% =
- ident("Calendar_JDayToDate")
- )dtoa% =
- ident("Calendar_DateToJDay")
- '"Calendar (0=stop, 1=julian, 2=gregorian, 3=hebrew, 4=islamic): "c%
- c%=0
- "Year : "y%
- "Month : "m%
- "Day : "d%
- '" R0=type R1=JDay R2=Year R3=Month R4=Day"
- !r0%=0:r1%=0:r2%=0:r3%=0:r4%=0
- dtoa%, c%,, y%,m%,d%
- r0%,r1%,r2%,r3%,r4%
- "DateToJDay "r0%" "r1%" "r2%" "r3%" "r4%
- jday%=r1%
- !r0%=0:r1%=0:r2%=0:r3%=0:r4%=0
- atod%, c%, jday%
- r0%,r1%,r2%,r3%,r4%
- "JDayToDate "r0%" "r1%" "r2%" "r3%" "r4%
- c%=0
- ident(swiname$)
- convert the given swi name to a swi number
- and print the result
- swinr%
- "OS_SWINumberFromString",, swiname$
- swinr%
- "OS_SWINumberFromString "swiname$" = "
- ~swinr%
- =swinr%
-