-
-
Notifications
You must be signed in to change notification settings - Fork 9
String Literal
IsaacShelton edited this page Nov 13, 2022
·
3 revisions
String
literals are strings surrounded with double quotes:
“Hello World”
“John”
“Welcome, Isaac Shelton.”
In order to create String
literals, the types String
and StringOwnership
must defined.
In order to satisfy these requirements, you can do one of the following:
- Import
2.7/String.adept
or2.7/basics.adept
- Declare your own version of the
String
type (deprecated)
String literals are references to constant global memory, and therefore have the StringOwnership::REFERENCE
ownership.
They should NEVER be modified without first making a copy via make()
or clone()
.