D
Deepu
Guest
Hi All,
I need some help in displaying decimal numbers with alignment to get
the output below:
[001000] TEST01: 1 TEST02: 1 TEST03: 0 NUMBER
[002000] TEST01: 10 TEST02: 5 TEST03: 1 NUMBER
[003000] TEST01: 150 TEST02: 25 TEST03: 10 NUMBER
[004000] TEST01: 15 TEST02: 2 TEST03: 10 NUMBER
I tried the below code:
$fdisplay(FH,"[%06d] TEST01: %0d TEST02: %0d TEST03: %0d\tNUMBER ");
But i got the output like:
[001000] TEST01: 1 TEST02: 1 TEST03: 0 NUMBER
[002000] TEST01: 10 TEST02: 5 TEST03: 1 NUMBER
[003000] TEST01: 150 TEST02: 25 TEST03: 10 NUMBER
[004000] TEST01: 15 TEST02: 2 TEST03: 10 NUMBER
Thanks for the help
I need some help in displaying decimal numbers with alignment to get
the output below:
[001000] TEST01: 1 TEST02: 1 TEST03: 0 NUMBER
[002000] TEST01: 10 TEST02: 5 TEST03: 1 NUMBER
[003000] TEST01: 150 TEST02: 25 TEST03: 10 NUMBER
[004000] TEST01: 15 TEST02: 2 TEST03: 10 NUMBER
I tried the below code:
$fdisplay(FH,"[%06d] TEST01: %0d TEST02: %0d TEST03: %0d\tNUMBER ");
But i got the output like:
[001000] TEST01: 1 TEST02: 1 TEST03: 0 NUMBER
[002000] TEST01: 10 TEST02: 5 TEST03: 1 NUMBER
[003000] TEST01: 150 TEST02: 25 TEST03: 10 NUMBER
[004000] TEST01: 15 TEST02: 2 TEST03: 10 NUMBER
Thanks for the help