subroutine DisplayFloat(float:FloatIn, integer:NumPlaces,
string:StringOut) is
integer I
integer Intermediate
integer Multiplier is 1
string BeforeDecimal
string AfterDecimal
for I = 1 to NumPlaces loop
copy (Multiplier * 10) to Multiplier
end loop
copy (FloatIn * Multiplier) to FloatIn
# This will truncate the now irrelevant decimal points
copy FloatIn to Intermediate
# This is the right string, but without the decimal point
copy Intermediate to StringOut
# Parse the string and insert the decimal
extract from StringOut
take (length of StringOut - NumPlaces) BeforeDecimal
take to last AfterDecimal
copy BeforeDecimal "." AfterDecimal to StringOut