#pragma strings

Applies to C Applies to C++

Description

The #pragma strings directive sets the storage type for string literals and specifies whether they can be placed in read-only or read-write memory.

Syntax

>>-#--pragma--strings--(--+-writeable-+--)---------------------><
                          '-readonly--'
 
 

Notes

Applies to C Strings are read-only by default if any form of the compiler invocation xlc is used.

Applies to C++ Strings are read-only by default if any form of the compiler invocations xlC or xlc++ is used.

This pragma must appear before any source statements in order to have effect.

Example

#pragma strings(writeable)

Related references

IBM Copyright 2003