F0O@psuvm.psu.edu (12/13/90)
I'm using QuickBasic 4.5, and I need to know the algorithm that converts a number like 123.456 into it's byte(s) representation. I need to know this to convert single, long or integer numbers. With QuickBasic, you can use the VARSEG and VARPTR functions to get the address of a variable, but QuickBasic doesn't provide the reverse function, given the address of a variable. I know you can simply pass the variable name and not have to worry about pointers, but for my application that won't work. I need to do this in QuickBasic; no calling a C or assembler routine. :-( What I can't do: CALL AssignValue(Value) Print Value ... SUB AssignValue(Value) Value = 123.456 or whatever END SUB What I want to do: Call AssignValue(Varseg(Value), VarPtr(Value)) print Value ... SUB AssignValue(Segment as integer, Offset as integer) put 123.456 into memory locations starting at Segment:Offset END SUB Any help would be greatly appreciated! [Tim]