Hi Bob,

Tryany of these:

X = 1

FMT(X, 'MD%4') =0001
FMT(X, 'MR%4') =0001
FMT(X, 'R%4')  =0001
X 'MD%4'       =0001
X 'R%4'        =0001

These all; work in Jbase, Universe flavor, YMMV.

Regards,
Charlie Noah

On 07-08-2011 2:17 PM, Bob Woodward wrote:
Hi Group,



I don't know why this is kicking my butt but I'm trying to do a simple X
= FMT(X,"4\0R") statement, straight out of the HELP UNIBASIC listing and
I can't seem to get it to work.  The problem is the fill character, in
this case the number zero, but what I get back is just the letter "R",
without the quote marks.  I get pretty much the same result no matter
what fill character I use.  I simply want to format a number to be 4
characters long with leading zeros.  If X="1", then it should result in
X="0001", or so I've been lead to believe.



I know that X = ("0000":X)[4] works to get my results but FMT should
work, too.  The major benefit is that if the number is more than 4
digits, FMT won't truncate it.  I hope.....



Environment is UniData 6.1 on a Windows server.   Comments anyone?



Thanks,



BobW



_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to