FUNCTION dec2bin && converts decimal number to binary number PARAMETERS nvalue ********************************************************************** *PROC/FUNC--> DEC2BIN - converts decimal number to binary number *--------------------------------------------------------------------- local cbinstr, nrest cbinstr = "" DO WHILE .T. nrest = MOD(nvalue,2) nvalue = INT(nvalue/2) cbinstr = STR(nrest,1) + cbinstr IF nvalue = 0 EXIT ENDIF ENDDO RETURN cbinstr ********************************************************************** *ÄÄÄÄÄÄÄÄÄÄÄÄÄÄ* End Of Func / Proc DEC2BIN *ÄÄÄÄÄÄÄÄÄÄÄÄÄÄ*>Hi All,