星期五, 9月 24, 2010

MI - Test Bit in String (TSTBTS)

Test Bit in String (TSTBTS)
RPGLE SAMPLE CODE:

H Option( *SrcStmt ) BndDir( 'QC2LE' )

**-- Test bit in string:
D tstbts Pr 10i 0 ExtProc( 'tstbts' )
D string * Value
D bitofs 10u 0 Value

D testStr S 4
D bitOffset c 30
D result S 10i 0

/Free

result = tstbts( %Addr( testStr ) : bitOffset );
dsply result;

/End-Free

沒有留言: