Gracias por la ayuda.
Un saludo
Carlos Pedrozo
Date: Wed, 29 Apr 2009 16:54:35 -0300
From: nicolas.mach...@metodo.com.ar
To: forum.help400@listas.combios.es
Subject: Re: Consulta de Biton / Bitoff en Free
Hola Carlos, segun el manual...
BITON (Set Bits On)
Free-Form Syntax
(not allowed - use the %BITOR built-in function. See Figure 139.)
Mas del Manual...
* This example shows how to duplicate the function of
* BITON and BITOFF using %BITAND, %BITNOT, and %BITOR
DName+++ETDsFrom+++To/L+++IDc.Keywords+
D fld1s 1a inz(x'01')
D fld2s 1a inz(x'FF')
CL0N01Factor1+++Opcode(E)+Factor2+++ResultLen++D+HiLoEq
C biton x'F4' fld1
* fld1 has an initial value of x'01' ( 0001)
* The 1 bits in x'F4' ( 0100) are set on
* fld1 has a final value of x'F5' ( 0101)
C bitoffx'F1' fld2
* fld2 has an initial value of x'FF' ( )
* The 1 bits in x'F1' ( 0001) are set off
* fld2 has a final value of x'0E' ( 1110)
/free
// this code performs the equivalent of the
// BITON and BITOFF operations above
// Set on the 1 bits of x'F4' in FLD1
fld1 = %bitor(fld1 : x'F4');
// Set off the 1 bits of x'F1' in FLD2
fld2 = %bitand(fld2 : %bitnot(x'F1'));
/end-free
Carlos Pedrozo escribió:
Hola foro;
Si alguien tiene un ejemplo para prender un BIT en free; les voy a agradecer.
Tengo un programa donde esta defiido un vector con 8 BITs
D BMP S 1DIM(8)
Las condiciones subsiguientes son:
c BITON '1' BMP(1)
Despues otra condicion
c BITON '2' BMP(1)
Como puedo prender o encender los BITs en RPG Free?
Les voy a agradecer si tienen un ejemplo.
Gracias de antemano
Saludos
C.P
Get news, entertainment and everything you care about at Live.com. Check it
out!
__
Forum.HELP400 es un servicio mamp;#225;s de ServerNEWS.
amp;#169; Publicaciones Help400, S.L. - Todos los derechos reservados
http://www.help400.es
_
Para darte de baja visita la siguente URL:
http://listas.combios.es/mailman/listinfo/forum.help400
--
.::.
Nicolas Machado
Metodo Argentina S.A.
_
Tel: 02262 527431
Necochea, Buenos Aires.G
_
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/__
Forum.HELP400 es un servicio mamp;#225;s de ServerNEWS.
amp;#169; Publicaciones Help400, S.L. - Todos los derechos reservados
http://www.help400.es
_
Para darte de baja visita la siguente URL:
http://listas.combios.es/mailman/listinfo/forum.help400