AnsweredAssumed Answered

VRF-Numeric_Conversion

Question asked by VRFuser on May 19, 1998
send q VRF-Numeric_Conversion ww vrf

from: Greg Goebel / HP-MXD
      gvg@lvld.hp.com / 800-452-4844
      website:  ftp://fcext3.external.hp.com/dist/mxd/index.html
to:   VRF-Janne Vainio
date: Wednesday, 20 May 1998 1403 MDT

I was filing my VRF archives for the day and took a closer look at this.
Something about it provokes my curiosity:

Since VEE doesn't support 64-bit signed integer values or 32-bit unsigned int
values, it cannot process those values directly. 

This means that either these values are being input from a device or a file
(or, equivalently, a constant) and are being sent to another device ... or
the reverse.

That would imply to me that they could be handled as an array of byte data.
The data would be read into the array and then sent out again without VEE
being any the wiser.

If there was some requirement that the data be output in an ASCII format,
that could be done as well, by converting the byte data into hex and then
using a lookup table to convert the hex digits to binary.  I have a function
that makes that particular conversion.

However, in the absence of a clear understanding of the use scenario going
into more detail would not likely be constructive.  The question asked here
seems to beg a few more questions that need to be resolved, questions that
are somewhat independent of VEE and relate to a definition of WHY this needs
to be done.


--------------------------------- cut here ----------------------------------

Hello , where I can found information how to convert 32/64-bit unsiged
integer or 64-bit signed integer to string which is binarically analogous
with that number?

In VEE it is impossible to handle 2^32 integers or bigger. Converting
those into real format doesn't help because bit operation functions and
To/From Socket cannot convert over 2^32 reals to integer. There
is not problem if 32-bit integer is smaller than 2^31-1. You cannot
feed e.g bit(x,y) function with 2^64 real. So, with VEE it is almost
impossble to receive/send 8-byte wide integers or 4-byte wide
unsigned int.

The reason why I want to convert integers to binarically analoguous
string is that we could send and receive those as strings when we
are communicating with other systems. Receiver doesn't know that
are sending strings instead integers.

Here is an example:

890 378 546 on binarically 0110101  00010010  00011001  00110010 and
as string ascii 53, ascii 18, ascii 25, ascii 50, which are
"5","DC2","EM","2", <5DC2EM2> ( DC2 and EM are control characters).
And same with 8-byte integers.

So, how to convert big numbers to strings? Or is there some other way
to send or receive big 8-byte integers with To/From Socket?

If you did't get the idea please  mail or call me because this problem must
be solved.

Regards, Janne Vainio
Nokia TC, New Radio Systems
Phone: 358951138452
e-mail: janne.vainio@ntc.nokia.com

Outcomes