#pragma strings

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

Read syntax diagramSkip visual syntax diagram>>-#--pragma--strings--(--+-writeable-+--)---------------------><
                          '-readonly--'

Notes

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

C++ only 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 information