続き
EXTERNAL FUNCTION CVI(A$) OPTION CHARACTER BYTE DECLARE NUMERIC A LET A=ORD(A$(1:1))+ORD(A$(2:2))*256 IF A>32767 THEN LET A=A-65536 LET CVI=A END FUNCTION
EXTERNAL FUNCTION CVL(A$) OPTION CHARACTER BYTE DECLARE NUMERIC A LET A=ORD(A$(1:1))+ORD(A$(2:2))*256+ORD(A$(3:3))*256^2+ORD(A$(4:4))*256^3 IF A>=2^31-1 THEN LET A=A-2^32 LET CVL=A END FUNCTION
EXTERNAL FUNCTION MKI$(X) OPTION CHARACTER BYTE DECLARE STRING A$,B$ LET A=INT(X) IF A<0 THEN LET A=A+65536 LET A$=CHR$(MOD(A,256)) LET B$=CHR$(INT(A/256)) LET MKI$=A$ & B$ END FUNCTION
EXTERNAL FUNCTION MKL$(A) OPTION CHARACTER BYTE DECLARE STRING A$,B$,C$,D$ IF A<0 THEN LET A=A+2^32 LET A$=CHR$(MOD(A,256)) LET B$=CHR$(MOD(INT(A/256),256)) LET C$=CHR$(MOD(INT(A/65536),256)) LET D$=CHR$(MOD(INT(A/16777216),256)) LET MKL$=A$ & B$ & C$ & D$ END FUNCTION
|