PLM2C
PL/M to C Translator
Handling boolean expressions
PL/M source code
oo: do;
/* This is a demo of context sensitive boolean expressions translations. */
declare v1 byte , v2 word , v3 dword ;
v1 = 0;
/* conversion of True and False conventions */ if v1 then v2 = 2;
/* context sensitive translations of the logical operations */
if v1 and v2 then v3 = 1;
v3 = not (v1 and v2);
end;
#include "..\C\builtin.h"
static BYTE v1; static WORD v2; static DWORD v3;
main() { v1 = 0; /* conversion of True and False conventions */ if ( (v1) &1 ) v2 = 2; /* context sensitive translations of the logical operations */ if ( (v1)&1 && (v2)&1 ) v3 = 1; v3 = ~(v1 & v2); }
Other Examples: Handling "Based" variables
Handling "Literally" declarations
Handling "AT" declarations
.