|
@@ -363,14 +363,18 @@ end
|
|
|
if $ARGS[0] = 'format_price_string':
|
|
|
$worknum = STR(ARGS[1])
|
|
|
worknumlength = LEN($worknum)
|
|
|
- pos1 = 1 &
|
|
|
- pos2 = iif((worknumlength MOD 3) = 0, 3, worknumlength MOD 3)
|
|
|
+ pos1 = 1
|
|
|
:format_price_string_loop
|
|
|
- $split = $MID($worknum, pos1, pos2)
|
|
|
- $result += iif(pos2 < worknumlength, $split+',', $split)
|
|
|
- pos1 = pos2+1
|
|
|
- pos2 = pos1+2
|
|
|
+ $split = $MID($worknum, pos1, 1)
|
|
|
+ if (worknumlength - 1)/3 ! (worknumlength-2)/3:
|
|
|
+ $result += $split+','
|
|
|
+ else
|
|
|
+ $result += $split
|
|
|
+ end
|
|
|
+ worknumlength -= 1
|
|
|
+ pos1 += 1
|
|
|
if pos2 <= worknumlength: jump 'format_price_string_loop'
|
|
|
killvar 'pos1' & killvar 'pos2' & killvar 'worknum' & killvar 'worknumlength' & killvar 'split'
|
|
|
end
|
|
|
---- agentned ---------------------------------
|
|
|
+--- agentned ---------------------------------
|
|
|
+
|