SUBROUTINE SCVTI (IVALUE, PICTUR, STRING) C***************************************************************************** C C Description : Routine to convert an integer value to a string according C to a given lay-out (picture-string) C C Arguments : IVALUE = INTEGER value to be converted C C PICTUR = STRING containing the picture code characters: C 9 - numeric position C Z - zero-suppressed numeric position (for non- C exponential notation only) C S - position of sign C for non-exponential notation: C S followed by a 9 or as the last character C of the picture-string indicates fixed sign, C S followed by a Z indicates floating sign C for exponential notation: C S must be the first character in the picture C otherwise it will cause unpredictable results C E - indicates exponential notation (must be the C last char. in the picture-string, if present) C C The last character in the picture-string, C other than 9,Z or S , and before the eventual E, C will be treated as the decimal point. C The picture-string may be max. 39 characters long. C C STRING = STRING returning the value-string C In case of an invalid picture-string or a picture- C string too small to reproduce the number in VALUE, C the resultstring has a minimum length of 7 charac- C ters (6 number characters + zero-byte). C C Author : F.A.Minkema C AKZO PHARMA, Oss Holland C dept. SDA C C Version : V1.0 Date : 1-dec-82 C C Module name : SCVTI.FTN C C Package : RSX-LIBRARY C C Compilation/Linking : FOR/F4P/TR:NONE SCVTI C C Updates : name version C C description : C C***************************************************************************** C BYTE PICTUR(1),STRING(1),HSTR(40) C CALL SCVTR(FLOAT(IVALUE),PICTUR,HSTR) ! convert integer to string C LS=LEN(HSTR) ! change floating default picture to integer default IF (PICTUR(LEN(PICTUR)).NE.'E' .AND. 1 LS.GT.4 .AND. HSTR(LS-3).EQ.'E') 2 CALL SCVTR(FLOAT(IVALUE),'ZZZZZ9',HSTR) C CALL SCOPY(HSTR,STRING) RETURN END