Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,47 @@
|
|||
MODULE LikeCommodoreBasic {
|
||||
\\ ADDITION: EUCLIDEAN DIV# & MOD# AND ** FOR POWER INCLUDING ^
|
||||
10 INPUT "ENTER A NUMBER:"; A%
|
||||
20 INPUT "ENTER ANOTHER NUMBER:"; B%
|
||||
30 PRINT "ADDITION:";A%;"+";B%;"=";A%+B%
|
||||
40 PRINT "SUBTRACTION:";A%;"-";B%;"=";A%-B%
|
||||
50 PRINT "MULTIPLICATION:";A%;"*";B%;"=";A%*B%
|
||||
60 PRINT "INTEGER DIVISION:";A%;"DIV";B%;"=";A% DIV B%
|
||||
65 PRINT "INTEGER EUCLIDEAN DIVISION:";A%;"DIV";B%;"=";A% DIV# B%
|
||||
70 PRINT "REMAINDER OR MODULO:";A%;"MOD";B%;"=";A% MOD B%
|
||||
75 PRINT "EUCLIDEAN REMAINDER OR MODULO:";A%;"MOD#";B%;"=";A% MOD# B%
|
||||
80 PRINT "POWER:";A%;"^";B%;"=";A%^B%
|
||||
90 PRINT "POWER:";A%;"**";B%;"=";A%**B%
|
||||
}
|
||||
LikeCommodoreBasic
|
||||
|
||||
|
||||
Module IntegerTypes {
|
||||
a=12% ' Integer 16 bit
|
||||
b=12& ' Long 32 bit
|
||||
c=12@' Decimal (29 digits)
|
||||
Def ExpType$(x)=Type$(x)
|
||||
Print ExpType$(a+1)="Double"
|
||||
Print ExpType$(a+1%)="Integer"
|
||||
Print ExpType$(a div 5)="Double"
|
||||
Print ExpType$(a div 5%)="Double"
|
||||
Print ExpType$(a mod 5)="Double"
|
||||
Print ExpType$(a mod 5%)="Double"
|
||||
Print ExpType$(a**2)="Double"
|
||||
|
||||
Print ExpType$(b+1)="Double"
|
||||
Print ExpType$(b+1&)="Long"
|
||||
Print ExpType$(b div 5)="Double"
|
||||
Print ExpType$(b div 5&)="Double"
|
||||
Print ExpType$(b mod 5)="Double"
|
||||
Print ExpType$(b mod 5&)="Double"
|
||||
Print ExpType$(b**2)="Double"
|
||||
|
||||
Print ExpType$(c+1)="Decimal"
|
||||
Print ExpType$(c+1@)="Decimal"
|
||||
Print ExpType$(c div 5)="Decimal"
|
||||
Print ExpType$(c div 5@)="Decimal"
|
||||
Print ExpType$(c mod 5)="Decimal"
|
||||
Print ExpType$(c mod 5@)="Decimal"
|
||||
Print ExpType$(c**2)="Double"
|
||||
}
|
||||
IntegerTypes
|
||||
Loading…
Add table
Add a link
Reference in a new issue