 |
» |
|
 |
|
 |

Copyright (c) Digital Equipment Corporation 1988. All rights reserved
LAYERED PRODUCT or COMPONENT: PLI V3.1 OP/SYS: VMS V5.0
SOURCE: Digital Customer Support Center
OVERVIEW:
This program converts an unsigned integer to a Hexadecimal (HEX) ASCII
string using the Run Time Library (RTL) Routine OTS$CVT_L_TZ.
CAUTION: This sample program has been tested using PLI 3.1 on VMS 5.0.
However, we cannot guarantee its effectiveness because of the
possibility of errors in transmitting or implementing it. It is meant
to be used as a template for writing your own program, and it may
require modification for use on your system.
PROGRAM SAMPLE:
bformat:proc options(main);
/*This program converts an unsigned integer to a ASCII text string
(HEX). It is particularly useful for converting the PID to its hex
representation*/
%include OTS$CVT_L_TZ;
%include $stsdef;
dcl value fixed bin(31);
dcl out_str char(8);
value = 541066945;
put skip list ('The value to be converted =',value);
sts$value = OTS$CVT_L_TZ(value,out_str,,);
If ^sts$success
then do;
put skip list('Failure with OTS$CVT_L_TZ ',sts$value);
signal VAXCONDITION(sts$value);
end;
put skip list ('The value in hex =',out_str);
end bformat;
|
buy online or call 1.800.AT.COMPAQ
|
|