Code: Select all
FUNCTION DoConsole2() AS VOID
LOCAL fTotal AS double
VAR aDouble := <OBJECT>{0.00,276.45,276.45}
Console.WriteLine("{0,12:###,##0.00}" + "{1,12:###,##0.00}" + "{2,20:###,###,##0.00}" , aDouble)
fTotal += (double) aDouble [ 3 ]
aDouble [ 1 ] := -1223.56
aDouble [ 2 ] := 7869
aDouble [ 3 ] := (double) aDouble [ 1 ] + (double) aDouble [ 2 ]
Console.WriteLine("{0,12:###,##0.00}" + "{1,12:###,##0.00}" + "{2,20:###,###,##0.00}" , aDouble)
fTotal += (double) aDouble [ 3 ]
// 12 + 12 == 24
Console.WriteLine(space ( 24 ) + repl ( "-" , 20 ) )
// 12 + 12 + 20 == 44
Console.WriteLine("{0,44:###,###,##0.00}" , fTotal )
RETURN
find the (runtime) problem
regards
Karl-Heinz