Chr function?

Pickering, John (NORBORD) PICKERIJ@norbord.com
Thu, 27 Jan 2000 11:47:27 -0500


"Integer size 2" is (duh!) 2 bytes long and you only want a single character
result.

The HP3000 is a big endian machine as opposed to something like a PC or a
Vax which is little endian. This means that the storage of binary numbers is
reversed. On an HP3000 the most significant byte is on the left; on little
endian machines the most significant byte is on the right. In your 1 word (2
byte) integer, the "65" or "A" is in the second byte on an HP3000 and in the
first byte on lesser machines.

Probably more than you wanted to know!

John Pickering
JWP Systems Inc
Toronto

> -----Original Message-----
> From:	jlkeepers@mmm.com [SMTP:jlkeepers@mmm.com]
> Sent:	Thursday, January 27, 2000 11:29 AM
> To:	powerh-l@lists.swau.edu
> Subject:	RE: Chr function?
> 
> 
> 
> Thanks to everyone who responded to my question about a CHR function.  The
> following solution worked great:
> 
> Define D-A Char*3 = Current-Year[1:3]
> Define D-I   Int Size 2 = Nconvert(D-A) - 135
> Define Final-Value Char*1 = Char(D-I)[2:1]
> 
> Current-Year: 200
> Final value: A
> 
> I had tried the Char function but not the [2:1].  I am still confused why
> the [2:1] is required but that will be for future contemplation.
> 
> Thanks again,
> Jeff Keepers
> 
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.