[an error occurred while processing this directive]
![]() | Forms Processor Advanced Commands |
Usage Char Range ----------------------------------------------------------------- String s 32k of data Character c 1 character Decimal number d -32767 to 32768 Long decimal number ld -2147483647 to 2147483648 unsigned decimal number u 0 to 65535 unsigned long decimal number lu 0 to 4294967295 hex number x 0x0000 to 0xffff unsigned long hex number lx 0x00000000 to 0xffffffff octal number o 0000 to 7777 long octal number lo 00000000 to 77777777 exponential format float number e unknown, machine dependent floating point number f unknown, machine dependent compact floating point number g unknownThe codes above should be prefixed like so:
Example:
# a not so uncommon large obnoxious number
$large_number = "20590.999999999998";
# round the number off to dollars and cents
$sub_total = sprintf("%6.2f",$large_number);
# now the sub_total contains "$20590.99"
$first_name = "Walt";
$last_name = "Webcom";
# concatenate first and last name is an index format
$name = sprintf("%s, %s",$last_name,$first_name);
# now name is "Webcom, Walt"
# print out the result
format screen
Customer index: $name
Your subtotal is: $sub_total
.