[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Printing 32nds (Was Re: print line)



PureBytes Links

Trading Reference Links

Following is a function, Str32nds, which returns a string value in
32nds.  It is easier to put this function call in print statements at
various times than to write the code inline for the conversions.

{Create Function Str32nds, Returning String}
Inputs: Value (Numeric);
Variables: Whole ("0"), Fraction ("0"), Delim ("-");

Whole = NumToStr(IntPortion(Value),0);
Fraction = RightStr("0" + NumToStr(FracPortion(Value) * 32,0),2);

Str32nds = Whole + Delim + Fraction;
{End of Function}

{Call Str32nds as follows to print Close in 32nds}
Print(Str32nds(Close));

Paul Zislis