Standard Library/dll

From J Wiki
Jump to navigation Jump to search
Overview | android | break | colib | compare | coutil | dates | debug | dir | dll | files | jade | jal | stdlib | strings | sysenv | text | unxlib

This script defines utilities for calling host system shared libraries and is included in the J standard library. Definitions are loaded into the z locale.

Definitions

A AND
C cd, cdcb, cder, cderx, cdf
E endian, Endian
F fc
I ic
J JB01, JBOXED, JCHAR, JCHAR2, JCHAR4, JCMPX, JFL, JINT, JPTR, JSB, JSIZES, JSTR, JSTR2, JSTR4, JTYPES
M mema, memf, memr, memu, memw
O OR
S symdat, symget, symset, SZI
X XOR

AND v bitwise AND (&)
cd v call DLL procedure
cdcb v callback address
cder v error information
cderx v GetLastError information
cdf v free DLLs
endian v flip intel bytes (little endian)
Endian v flip powerpc bytes (BIG Endian)
fc v float conversion
JB01 n 1
JBOXED n 32
JCHAR n 2
JCHAR2 n 131072
JCHAR4 n 262144
JCMPX n 16
JFL n 8
JINT n 4
JPTR n JINT
JSB n 65536
JSIZES n size in bytes of corresponding JTYPES
JSTR n _1,JCHAR
JSTR2 n _1,JCHAR2
JSTR4 n _1,JCHAR4
JTYPES n JB01,JCHAR,JINT,JPTR,JFL,JCMPX,JBOXED,JSB,JCHAR2,JCHAR4
mema v memory allocate
memf v memory free
memr v memory read
memu v forcecopy
memw v memory write
OR v )
symdat v get address of data for name
symget v get address of locale entry for name
symset v set array as address
SZI n size in bytes of integer
XOR v bitwise XOR (^)

ic (verb)

Integer conversion e.g.

   25185 25699 = _1 ic 'abcd'
   'abcd' = 1 ic _1 ic 'abcd'
   1684234849 1751606885 = _2 ic 'abcdefgh'
   'abcdefgh' = 2 ic _2 ic 'abcdefgh'