Time for an 2014 update…

This commit is contained in:
Ingy döt Net 2014-01-17 05:32:22 +00:00
parent 372c577f83
commit 09687c4926
2520 changed files with 34227 additions and 7318 deletions

View file

@ -1,20 +1,20 @@
#define std'dictionary'*.
#define std'basic'*.
#define system.
#define extensions.
#symbol BitwiseTest &former:anA &later:aB =
#symbol bitwiseTest = (:x:y)
[
'program'output << anA << " and " << aB << " = " << anA and:aB << "%n".
'program'output << anA << " or " << aB << " = " << anA or:aB << "%n".
'program'output << anA << " xor " << aB << " = " << anA xor:aB << "%n".
'program'output << "not " << anA << " = " << anA inverted << "%n".
'program'output << anA << " shr " << aB << " = " << anA __shift'add:aB << "%n".
'program'output << anA << " shl " << aB << " = " << anA __shift'subtract:aB << "%n".
console write:x write:" and " write:y write:" = " writeLine:(x and:y).
console write:x write:" or " write:y write:" = " writeLine:(x or:y).
console write:x write:" xor " write:y write:" = " writeLine:(x xor:y).
console write:"not " write:x write:" = " writeLine:(x not).
console write:x write:" shr " write:y write:" = " writeLine:(x shift:y).
console write:x write:" shl " write:y write:" = " writeLine:(x shift:(y negative)).
].
#symbol Program =
#symbol program =
[
#var a := 'program'input >> Integer.
#var b := 'program'input >> Integer.
#var a := consoleEx readLine:(Integer new).
#var b := consoleEx readLine:(Integer new).
BitwiseTest &&former:a &later:b.
bitwiseTest:a:b.
].