Bitwise operations: Difference between revisions
Content added Content deleted
imported>KayproKid (Added S-BASIC example) |
imported>KayproKid m (→{{header|S-BASIC}}: fixed tag glitch) |
||
Line 5,661: | Line 5,661: | ||
=={{header|S-BASIC}}== |
=={{header|S-BASIC}}== |
||
S-BASIC does not have bitwise shift or rotate operators. The test values are taken from the 11l example. |
S-BASIC does not have bitwise shift or rotate operators. The test values are taken from the 11l example. |
||
<syntaxhighlight lang="BASIC" |
<syntaxhighlight lang="BASIC"> |
||
var a, b = integer |
var a, b = integer |
||
a = 10 |
a = 10 |
||
Line 5,697: | Line 5,697: | ||
println("a rol b: " + Integer.rotateRight(a, b)) // Rotate Right |
println("a rol b: " + Integer.rotateRight(a, b)) // Rotate Right |
||
}</syntaxhighlight> |
}</syntaxhighlight> |
||
=={{header|Scheme}}== |
=={{header|Scheme}}== |
||
{{Works with|Scheme|R<math>^6</math>RS}} |
{{Works with|Scheme|R<math>^6</math>RS}} |