Bitwise operations: Difference between revisions

Content added Content deleted
(Added DWScript)
No edit summary
Line 988: Line 988:


MAXScript doesn't have arithmetic shift or rotate operations.
MAXScript doesn't have arithmetic shift or rotate operations.

=={{header|ML/I}}==
ML/I only supports bitwise AND and OR operations. These are available from version CKD onwards.

<lang ML/I>MCSKIP "WITH" NL
"" Bitwise operations
"" assumes macros on input stream 1, terminal on stream 2
MCSKIP MT,<>
MCINS %.
MCDEF SL SPACES NL AS <MCSET T1=%A1.
MCSET T2=%A2.
a and b = %%T1.&%T2..
a or b = %%T1.|%T2..
The other operators are not supported.
MCSET S10=0
>
MCSKIP SL WITH *
MCSET S1=1
*MCSET S10=2
</lang>


=={{header|Modula-3}}==
=={{header|Modula-3}}==