Code:
'' compile with fb/fblitetype DoubleNibble LoBits:4 as ubyte HiBits:4 as ubyteend typedim x as DoubleNibblex.LoBits = 3x.HiBits = 5'' show the bitsprint "HHHHLLLL"print bin( *cast( ubyte ptr, @x ), 8 )'' OUTPUT:'' HHHHLLLL'' 01010011
Statistics: Posted by coderJeff — Thu Mar 06, 2008 7:31 am
Statistics: Posted by Mentat — Wed Mar 05, 2008 10:01 pm
Code:
'' compile with fbc -lang fblitedefint a-zsub test print "---- Initial Values print " i", " j", " k" goto thereback: print "---- FOR NEXT for i = 1 to 3 '' i has proc scope (defaults to 0) dim k '' k has proc scope (defaults to 0) dim j = 10 '' j has proc scope (defaults to 0) '' but assigned to 10 each time this '' line encountered k = k + 1 j = j + 1 print i, j, k next i print "---- After FOR NEXT print i, j, k exit subthere: print i, j, k goto backend subtest
Code:
---- Initial Values i j k 0 0 0---- FOR NEXT 1 11 1 2 11 2 3 11 3---- After FOR NEXT 4 11 3
Statistics: Posted by coderJeff — Wed Mar 05, 2008 9:06 am
Statistics: Posted by coderJeff — Tue Mar 04, 2008 2:53 pm