Document revision date: 30 March 2001

## OpenVMS RTL String Manipulation (STR$) Manual

Previous | Contents | Index

## STR$UPCASE

> The Convert String to All Uppercase Characters routine converts a source string to uppercase.

### Format

> STR$UPCASE destination-string ,source-string

### RETURNS

> OpenVMS usage: | cond_value
> type: | longword (unsigned)
> access: | write only
> mechanism: | by value

### Arguments

> #### destination-string

> OpenVMS usage: | char_string
> type: | character string
> access: | write only
> mechanism: | by descriptor

> Destination string into which STR$UPCASE writes the string it has converted to uppercase. The destination-string argument is the address of a descriptor pointing to the destination string.

> #### source-string

> OpenVMS usage: | char_string
> type: | character string
> access: | read only
> mechanism: | by descriptor

> Source string that STR$UPCASE converts to uppercase. The source-string argument is the address of a descriptor pointing to the source string.

### Description

> STR$UPCASE converts successive characters in a source string to uppercase and writes the converted character into the destination string. The routine converts all characters in the DEC Multinational Character Set.

### Condition Values Returned

> SS$_NORMAL | Normal successful completion.
> STR$_TRU | String truncation warning. The destination string could not contain all the characters.

### Condition Values Signaled

> STR$_FATINTERR | Fatal internal error. An internal consistency check has failed. This usually indicates an internal error in the Run-Time Library and should be reported to your Compaq support representative.
> STR$_ILLSTRCLA | Illegal string class. The class code found in the class field of a descriptor is not a string class code allowed by the OpenVMS calling standard.
> STR$_INSVIRMEM | Insufficient virtual memory. STR$UPCASE could not allocate heap storage for a dynamic or temporary string.

### Example

    30  !+
        !  This example uses STR$UPCASE
        !  to convert all characters in
        !  the source string (SRC$) to
        !  uppercase and write the result
        !  in the destination string (DST$).
        !-

        SRC$ = 'abcd'
        PRINT "SRC$ =";SRC$
        CALL STR$UPCASE (DST$, SRC$)
        PRINT "DST$ =";DST$
        END

> This BASIC program generates the following output:

>     SCR$ =abcd
>     DST$ =ABCD

Index | Contents

| privacy and legal statement |
5936PRO_010.HTML