> -----Original Message-----
> From: Harrington, Don
>
> Why does this code:
>
> 430 CONTINUE
> PRINT *,"AT 430, JOBNUMI:",JOBNUMI
> JOBNUMI = JOBNUMI - 2J
> PRINT *,"JOBNUMI- 2J:",JOBNUMI
[snipped comment lines]
***** what's going on here? \\\
> N=DASCII(JOBNUML,-10,JOBSAVEC)
***** what's going on here? ///
> PRINT *,"AFTER DASCII, N:",N," JOBNUMI:",JOBNUMI,
> + " JOBSAVEC:",JOBSAVEC
[snipped more stuff]
>
> produce this result:
>
> AT 430, JOBNUMI: 31402999
> JOBNUMI- 2J: 31402997
> AFTER DASCII, N: 8 JOBNUMI: 808597817 JOBSAVEC:71402999
How and where is the variable JOBSAVEC defined? I'm willing to bet that it
is defined IMMEDIATELY prior to the variable JOBNUMI (or at any rate, the
compiler reserved buffer space for JOBSAVEC immediately prior to the
contents of JOBNUMI) Further, I'm willing to bet that JOBSAVEC is defined
as a string (CHARACTER array?) of length 3.
The number 8059817 expressed in HEXADECIMAL is 30323939, or placing spaces
between each "byte" reveals: 30 32 39 39. Translating hex to ascii is
REALLY easy for "digits" -- any hex number beginning with a "3" and ending
with "0" thru "9" corresponds directly to the ascii value for that digit, in
other words, the "ascii" representation of the contents of JOBNUMI now
contains 0299, the 4th through 7th digit of the original JOBNUMI value (I'm
also presuming jobnum-L contains the same or similar value as jobnumI)
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|