Home

Michael Heilmann's Runtime Mark 1

This is the documentation for Michael Heilmann's Runtime Mark 1, henceforth R1. R1 facilitates the creation of C programs - in particular interpreters - that are portable, maintainable, as well as safe. R1 is available at michaelheilmann.com/repository/R1.

1. Files

You can find the sources of R1 in my GitHub repository https://github.com/michaelheilmann/michaelheilmann.com. The subdirectory of R1 in the repository is here https://github.com/michaelheilmann/michaelheilmann.com/tree/main/repository/R1.

R1 supports various platforms (including but not restricted to Windows, Linux, and many more), however, we currently only officially support Windows. Find instructions on how to build, test, and use R1 under various systems, please refer to README.md in the root folder of the repository.

2. Further References

R1 relies on ARMS1 and Arcadia Ring1.

3. Documentation

3.8. Objects

Byte Buffer

R_ByteBuffer represents a mutable sequence of Bytes. This type is allocated on the heap and values of this type are referenced by R_ByteBuffer pointers. A R_ByteBuffer pointer can be safely cast into a R_ObjectReferenceValue values. An R_ObjectReferenceValue pointing to a R_ByteBuffer value can be safely cast into a R_ByteBuffer pointer.

create

R_ByteBuffer* R_ByteBuffer_create()

Create an empty Byte buffer.

Return Value

A pointer to the Byte buffer.

clear

void R_ByteBuffer_clear(R_ByteBuffer* self)

Set the number of elements of this Byte buffer to zero.

Parameters
R_ByteBuffer* selfA pointer to this Byte buffer.
endsWith_pn

R_BooleanValue R_ByteBuffer_endsWith_pn(R_ByteBuffer const* self, void const* bytes, R_SizeValue numberOfBytes)

Get if a sequence of Bytes is a suffix of this Byte buffer's sequence of Bytes.

Parameters
R_ByteBuffer* self A pointer to this Byte buffer.
void const* bytes A pointer to an array of n Bytes.
R_SizeValue numberOfBytesThe number of Bytes in the array pointed to by p.
Return Value

R_BooleanValue_True if the sequence of Bytes is a suffix of this byte buffer's sequence of Bytes. R_BooleanValue_False otherwise.

startsWith_pn

R_BooleanValue R_ByteBuffer_startsWith_pn(R_ByteBuffer const* self, void const* bytes, R_SizeValue numberOfBytes)

Get if a sequence of Bytes is a prefix of this Byte buffer's sequence of Bytes.

Parameters
R_ByteBuffer* self A pointer to this Byte buffer.
void const* bytes A pointer to an array of n Bytes.
R_SizeValue numberOfBytesThe number of Bytes in the array pointed to by p.
Return Value

R_BooleanValue_True if the sequence of Bytes is a prefix of this byte buffer's sequence of Bytes. R_BooleanValue_False otherwise.

isEqualTo_pn

R_BooleanValue R_ByteBuffer_isEqualTo_pn(R_ByteBuffer const* self, void const* bytes, R_SizeValue numberOfBytes)

Get if a sequence of Bytes is this Byte buffer's sequence of Bytes.

Parameters
R_ByteBuffer* self A pointer to this Byte buffer.
void const* bytes A pointer to an array of n Bytes.
R_SizeValue numberOfBytesThe number of Bytes in the array pointed to by p.
Return Value

R_BooleanValue_True if the sequence of Bytes is this byte buffer's sequence of Bytes. R_BooleanValue_False otherwise.

append_pn

void R_ByteBuffer_append_pn(R_ByteBuffer* self, void const* bytes, R_SizeValue numberOfBytes)

Append Bytes to this Byte buffer.

Parameters
R_ByteBuffer* self A pointer to this Byte buffer.
void const* bytes A pointer to an array of n Bytes.
R_SizeValue numberOfBytesThe number of Bytes in the array pointed to by p.
Errors
R_Status_ArgumentValueInvalidself is a null pointer.
R_Status_ArgumentValueInvalidbytes is a null pointer.
R_Status_AllocationFailed An allocation failed.
prepend_pn

void R_ByteBuffer_prepend_pn(R_ByteBuffer* self, void const* p, R_SizeValue n)

Prepend Bytes to this Byte buffer.

Parameters
R_ByteBuffer* selfA pointer to this Byte buffer.
void const* p A pointer to an array of n Bytes.
R_SizeValue n The number of Bytes in the array pointed to by p.
Errors
R_Status_ArgumentValueInvalidself is a null pointer.
R_Status_ArgumentValueInvalidbytes is a null pointer.
R_Status_AllocationFailed An allocation failed.
insert_pn

void R_ByteBuffer_insert_pn(R_ByteBuffer* self, R_SizeValue index, void const* p, R_SizeValue n)

Insert Bytes into this Byte buffer.

Parameters
R_ByteBuffer* selfA pointer to this Byte buffer.
R_SizeValue index The index at which to insert the Bytes. Must be within the bounds of [0,n) where n is the size of this Byte buffer.
void const* p A pointer to an array of n Bytes.
R_SizeValue n The number of Bytes in the array pointed to by p.
Errors
R_Status_ArgumentValueInvalidself is a null pointer.
R_Status_ArgumentValueInvalidbytes is a null pointer.
R_Status_AllocationFailed An allocation failed.
isEqualTo

R_BooleanValue R_ByteBuffer_isEqualTo(R_ByteBuffer const* self, R_ByteBuffer const* other)

Compare this Byte buffer with another Byte buffer for equality.

Parameters
R_ByteBuffer const* self A pointer to this Byte buffer.
R_ByteBuffer const* otherA pointer to the other Byte buffer.
Return Value

R_BooleanValue_True if this Byte buffer is equal to the other Byte buffer. R_BooleanValue_False otherwise.

getSize

R_SizeValue R_ByteBuffer_getSize(R_ByteBuffer const* self)

Get the size of this Byte buffer.

Parameters
R_ByteBuffer* selfA pointer to this Byte buffer.
Return Value

The size of this Byte buffer.

Remarks

The size of a Byte buffer is the length of the Byte sequence it contains.

getat

R_Natural8Value R_ByteBuffer_getAt(R_ByteBuffer const* self, R_SizeValue index)

Get the Byte value at the specified index.

Parameters
R_ByteBuffer* selfA pointer to this Byte buffer.
R_SizeValue indexThe index. Must be within the bounds [0,n) where n is the size of this Byte buffer.
Return Value

The Byte value.

Remarks

The size of a Byte buffer is the length of the Byte sequence it contains.

isEmpty

R_BooleanValue R_ByteBuffer_isEmpty(R_ByteBuffer* self)

Get if this Byte buffer is empty.

Parameters
R_ByteBuffer* selfA pointer to this Byte buffer.
Return Value

R_BooleanValue_True if this Byte buffer is empty. R_BooleanValue_False otherwise.

Errors
R_Status_ArgumentValueInvalidself is a null pointer.
swap

void R_ByteBuffer_swap(R_ByteBuffer* self, R_ByteBuffer* other)

Swap the contents of this Byte buffer with the contents of another Byte buffer.

Parameters
R_ByteBuffer* selfA pointer to this Byte buffer.
R_ByteBuffer* selfA pointer to the other Byte buffer.
Errors
R_Status_ArgumentValueInvalidself is a null pointer.
R_Status_ArgumentValueInvalidother is a null pointer.

File Handle

R_FileHandle represents a operating system file handle. This type is allocated on the heap and values of this type are referenced by R_FileHandle pointers. A R_FileHandle pointer can be safely cast into a R_ObjectReferenceValue values. An R_ObjectReferenceValue pointing to a R_FileHandle value can be safely cast into a R_FileHandle pointer.

create

R_FileHandle* R_FileHandle_create(R_FileSystem* fileSystem)

Create a file handle. The file handle is closed.

Parameters
R_FileSystem* selfA pointer to the backing R_FileSystem object.
Return Value

A pointer to the file handle.

close

void R_FileHandle_close(R_FileHandle* self)

Close this file handle.

Parameters
R_FileHandle* selfA pointer to this file handle.
openForReading

void R_FileHandle_openForReading(R_FileHandle* self, R_FilePath* path)

Open a file for reading. If the file is open, it is closed before trying to re-open it.

Parameters
R_FileHandle* selfA pointer to this file handle.
R_FilePath* path The file path of the file to read from.
Errors
R_Status_ArgumentValueInvalid self is a null pointer.
R_Status_ArgumentValueInvalid path is a null pointer.
R_Status_FileSystemOperationFailedOpening the file failed.
openForWriting

void R_FileHandle_openForWriting(R_FileHandle* self, R_FilePath* path)

Open a file for writing. If the file is open, it is closed before trying to re-open it.

Parameters
R_FileHandle* selfA pointer to this file handle.
R_FilePath* path The file path of the file to write to.
Errors
R_Status_ArgumentValueInvalid self is a null pointer.
R_Status_ArgumentValueInvalid path is a null pointer.
R_Status_FileSystemOperationFailedOpening the file failed.
isClosed

R_BooleanValue R_FileHandle_isClosed(R_FileHandle const* self)

Get if this file handle is closed.

Parameters
R_FileHandle const* self A pointer to this file handle.
isOpened

R_BooleanValue R_FileHandle_isOpened(R_FileHandle const* self)

Get if this file handle is opened.

Parameters
R_FileHandle const* self A pointer to this file handle.
isOpenedForReading

R_BooleanValue R_FileHandle_isOpenedForReading(R_FileHandle const* self)

Get if this file handle is opened for reading.

Parameters
R_FileHandle const* self A pointer to this file handle.
isOpenedForWriting

R_BooleanValue R_FileHandle_isOpenedForWriting(R_FileHandle const* self)

Get if this file handle is opened for writing.

Parameters
R_FileHandle const* self A pointer to this file handle.
write

void R_FileHandle_write(R_FileHandle* self, void const* p, R_SizeValue bytesToWrite)

Write Bytes to this file handle.

Parameters
R_FileHandle* self A pointer to this file handle.
void const* bytes A pointer to an array of bytesToWrite Bytes.
R_SizeValue bytesToWrite The number of Bytes in the array pointed to by bytes.
R_SizeValue* bytesWrittenA pointer to a R_SizeValue variable.
Success

On success *bytesWritten is assigned the actual number of Bytes written.

Errors
R_Status_ArgumentValueInvalid self is a null pointer.
R_Status_ArgumentValueInvalid bytes is a null pointer.
R_Status_OperationInvalid The file is not opened for writing.
R_Status_FileSystemOperationFailedWriting failed.
read

void R_FileHandle_read(R_FileHandle* self, void const* bytes, R_SizeValue bytesToRead, R_SizeValue* bytesRead)

Read Bytes from this file handle.

Parameters
R_FileHandle* self A pointer to this file handle.
void const* bytes A pointer to an array of bytesToWrite Bytes.
R_SizeValue bytesToRead The number of Bytes to read from the the array pointed to by bytes.
R_SizeValue* bytesRead A pointer to a R_SizeValue variable.
Success

On success *bytesRead is assigned the actual number of Bytes read. The number of Bytes read is 0 if the end of the file was reached.

Errors
R_Status_ArgumentValueInvalid self is a null pointer.
R_Status_ArgumentValueInvalid bytes is a null pointer.
R_Status_ArgumentValueInvalid bytesRead is a null pointer.
R_Status_OperationInvalid The file is not opened for writing.
R_Status_FileSystemOperationFailedWriting failed.

File Path

R_FilePath represents a file path. This type is allocated on the heap and values of this type are referenced by R_FilePath pointers. A R_FilePath pointer can be safely cast into a R_ObjectReferenceValue values. An R_ObjectReferenceValue pointing to a R_FilePath value can be safely cast into a R_FilePath pointer.

create

R_FilePath* R_Path_create()

Create the empty file path.

Return Value

A pointer to the file path.

parseWindows

R_FilePath* R_FilePath_parseWindows(void const* bytes, R_SizeValue numberOfBytes)

Parse a file path in the Windows format.

Parameters
bytesA pointer to an array of numberOfBytes Bytes.
numberOfBytesThe number of Bytes in the array pointed to by bytes Bytes.
Return Value

A pointer to the file path.

parseUnix

R_FilePath* R_FilePath_parseUnix(void const* bytes, R_SizeValue numberOfBytes)

Parse a file path in the Unix format.

Parameters
bytesA pointer to an array of numberOfBytes Bytes.
numberOfBytesThe number of Bytes in the array pointed to by bytes Bytes.
Return Value

A pointer to the file path.

parseNative

R_FilePath* R_FilePath_parseNative(void const* bytes, R_SizeValue numberOfBytes)

Parse a file path in the native format.

Parameters
bytesA pointer to an array of numberOfBytes Bytes.
numberOfBytesThe number of Bytes in the array pointed to by bytes Bytes.
Return Value

A pointer to the file path.

toNative

R_String* R_FilePath_toNative(R_FilePath* self)

Convert a file path to the native format.

Parameters
selfA pointer to this file path.
Return Value

A pointer to the string.

FileSystem

R_FileSystem provides access to the file system. This type is allocated on the heap and values of this type are referenced by R_String pointers. A R_FileSystem pointer can be safely cast into a R_ObjectReferenceValue values. An R_ObjectReferenceValue pointing to a R_String value can be safely cast into a R_String pointer.

R_FileSystem_create

R_FileSystem* R_FileSystem_create()

Create a file system.

Errors
R_Status_AllocationFailedAn allocation failed.
getFileContents

R_ByteBuffer* R_ByteBuffer_getFileContents(R_FilePath *path)

Get the contents of a file.

Parameters
R_FilePath* pathThe file path of the file.
Return Value

A pointer to a R_ByteBuffer object with the file contents.

Errors
R_Status_ArgumentValueInvalidpath is a null pointer.
R_Status_FileSystemOperationFailedOpening the file failed.
setFileContents

void R_FileSystem_setFileContents(R_FilePath* path, R_ByteBuffer* contents)

Get if a sequence of Bytes is a prefix of this string's sequence of Bytes.

Parameters
R_FilePath* pathThe file path of the file.
R_ByteBuffer const* byteBufferA poiner to the Byte buffer with the file contents.
Errors
R_Status_ArgumentValueInvalid path is a null pointer.
R_Status_ArgumentValueInvalid contents is a null pointer.
R_Status_FileSystemOperationFailedOpening the file failed.

List

R_List represents a list of R_Value objects. This type is allocated on the heap and values of this type are referenced by R_List pointers. A R_List pointer can be safely cast into a R_ObjectReferenceValue values. An R_ObjectReferenceValue pointing to a R_List value can be safely cast into a R_List pointer.

R_List_create

R_List* R_List_create()

Create a list.

Parameters
bytes A pointer to an array of Bytes.
numberOfBytesThe number of Bytes in the array pointed to by bytes.
Errors
R_Status_ArgumentValueInvalidbytes is a null pointer.
R_Status_EncodingInvalid The sequence of Bytes does not represented a UTF-8-NO-BOM string.
Return value

A pointer to the R_List value.

append

void R_List_append(R_List* self, R_Value value)

Append a R_Value to a list.

Parameters
R_List* self A pointer to this list.
R_Value value The value to append.
clear

void R_List_clear(R_List* self)

Clear this list.

Parameters
R_List* selfA pointer to this list.
getAt

R_Value R_List_getAt(R_List* self, R_SizeValue index)

Get the value at the specifie index in this list.

Parameters
R_List* selfA pointer to this list.
R_SizeValue indexThe index. Must be within the bounds [0,n) where n is the size of this list.
Return Value

The value.

getSize

R_SizeValue R_List_getSize(R_List const* self)

Get the size of this list.

Parameters
R_List* selfA pointer to this list.
Return Value

The size of this list.

insert

void R_List_insertAt(R_List* self, R_SizeValue index, R_Value value)

Compare this string with another string for equality.

Parameters
R_List* self A pointer to this list.
R_SizeValue index The index at which to insert the value. Must be within the bounds of [0,n] where n is the size of thie list.
R_Value value The value to insert.
isEmpty

R_BooleanValue R_List_isEmpty(R_List* self)

Get if this list is empty.

Parameters
R_List* selfA pointer to this list.
Return Value

R_BooleanValue_True if this list is empty. R_BooleanValue_False otherwise.

Errors
R_Status_ArgumentValueInvalidself is a null pointer.
prepend

void R_List_prepend(R_List* self, R_Value value)

Get if a sequence of Bytes is a prefix of this string's sequence of Bytes.

Prepend a R_Value to a list.

Parameters
R_List* self A pointer to this list.
R_Value value The value to prepend.
remove

void R_List_remove(R_List* self, R_SizeValue index, R_SizeValue count)

Remove length elements starting with element at index index.

Parameters
R_List* selfA pointer to this list.
R_SizeValue indexThe index of the first element to remove.
R_SizeValue lengthThe number of elements to remove.
Errors
R_Status_ArgumentValueInvalidself is a null pointer.
R_Status_ArgumentValueInvalidindex + count > n where n is the length of the list.

Stack

R_Stack represents a stack of R_Value objects. This type is allocated on the heap and values of this type are referenced by R_Stack pointers. A R_Stack pointer can be safely cast into a R_ObjectReferenceValue values. An R_ObjectReferenceValue pointing to a R_Stack value can be safely cast into a R_Stack pointer.

R_Stack_create

R_Stack* R_Stack_create()

Create a stack.

Errors
R_Status_ArgumentValueInvalidbytes is a null pointer.
R_Status_EncodingInvalid The sequence of Bytes does not represented a UTF-8-NO-BOM string.
Return value

A pointer to the R_Stack value.

clear

void R_Stack_clear(R_Stack* self)

Clear this stack.

Parameters
R_Stack* selfA pointer to this stack.
getSize

R_SizeValue R_Stack_getSize(R_Stack const* self)

Get the size of this stack.

Parameters
R_Stack* selfA pointer to this stack.
Return Value

The size of this stack.

isEmpty

R_BooleanValue R_Stack_isEmpty(R_Stack* self)

Get if this stack is empty.

Parameters
R_Stack* selfA pointer to this stack.
Return Value

R_BooleanValue_True if this stack is empty. R_BooleanValue_False otherwise.

Errors
R_Status_ArgumentValueInvalidself is a null pointer.
peek

R_Value R_Stack_peek(R_Stack* self)

Peek at the value on top of this stack.

Parameters
R_Stack self A pointer to this stack.
Return Value

The value.

pop

R_Value R_Stack_pop(R_Stack* self)

Pop the value from the top of this stack.

Parameters
R_Stack self A pointer to this stack.
Return Value

The value.

push

void R_Stack_push(R_Stack* self, R_Value value)

Push a value on the top of this stack.

Parameters
R_Stack* self A pointer to this stack.
R_Value value The value to push.

String

R_String represents an Unicode string encoded as UTF-8-NO-BOM. This type is allocated on the heap and values of this type are referenced by R_String pointers. A R_String pointer can be safely cast into a R_ObjectReferenceValue values. An R_ObjectReferenceValue pointing to a R_String value can be safely cast into a R_String pointer.

R_String_create_pn

R_String* R_String_create_pn(R_ImmutableByteArray* immutableByteArray)

Create a string from an immutable Byte array.

Parameters
immutableByteArrayA pointer to an immutable Byte array
Return value

A pointer to the string.

Errors
R_Status_ArgumentValueInvalidimmutableByteArray is a null pointer.
R_Status_EncodingInvalid The sequence of Bytes does not represented a UTF-8-NO-BOM string.
R_String_create

R_String* R_String_create_pn(R_Value value)

Create a string from a value.

The specified value may contain a R_ByteBuffer object. In that case, the string is created from the Bytes of the Byte buffer object. A R_Status_EncodingInvalid is raised if the Byte sequence of that R_ByteBuffer object is not a UTF8 Byte sequence.

The specified value may contain a R_String object. In that case, the string is created from the R_String object.

The specified value may contain a R_StringBuffer object. In that case, the string is created from the R_StringBuffer object.

The specified value may contain a R_ImmutableByteArray object. In that case, the string is created from the R_ImmutableByteArray object.

Parameters
value The value.
Return value

A pointer to the string.

Errors
R_Status_ArgumentTypeInvalid The value does not contain either a R_ByteBuffer object, a R_String object, or a R_StringBuffer object.
R_Status_EncodingInvalid The value contains a R_ByteBuffer object. However, the Byte sequence of that R_ByteBuffer object is not a UTF8 Byte sequence.
endsWith_pn

R_BooleanValue R_String_endsWith_pn(R_String const* self, void const* bytes, R_SizeValue numberOfBytes)

Get if a sequence of Bytes is a suffix of this string's sequence of Bytes.

Parameters
R_String* self A pointer to this string.
void const* bytes A pointer to an array of n Bytes.
R_SizeValue numberOfBytesThe number of Bytes in the array pointed to by p.
Return Value

R_BooleanValue_True if the sequence of Bytes is a suffix of this string's sequence of Bytes. R_BooleanValue_False otherwise.

startsWith_pn

R_BooleanValue R_String_startsWith_pn(R_String const* self, void const* bytes, R_SizeValue numberOfBytes)

Get if a sequence of Bytes is a prefix of this string's sequence of Bytes.

Parameters
R_String* self A pointer to this string.
void const* bytes A pointer to an array of n Bytes.
R_SizeValue numberOfBytesThe number of Bytes in the array pointed to by p.
Return Value

R_BooleanValue_True if the sequence of Bytes is a prefix of this string's sequence of Bytes. R_BooleanValue_False otherwise.

isEqualTo

R_BooleanValue R_String_isEqualTo(R_String const* self, R_String const* other)

Compare this string with another string for equality.

Parameters
R_String const* self A pointer to this string.
R_String const* otherA pointer to the other string.
Return Value

R_BooleanValue_True if this string is equal to the other string. R_BooleanValue_False otherwise.

isEqualTo_pn

R_BooleanValue R_String_isEqualTo_pn(R_String const* self, void const* bytes, R_SizeValue numberOfBytes)

Get if a sequence of Bytes is this string's sequence of Bytes.

Parameters
R_String* self A pointer to this string.
void const* bytes A pointer to an array of n Bytes.
R_SizeValue numberOfBytesThe number of Bytes in the array pointed to by p.
Return Value

R_BooleanValue_True if the sequence of Bytes is this string's sequence of Bytes. R_BooleanValue_False otherwise.

getNumberOfBytes

R_SizeValue R_String_getNumberOfBytes(R_String const* self)

Get the size, in Bytes, of this string.

Parameters
R_String* selfA pointer to this string.
Return Value

The size, in Bytes, of this string.

getByteAt

R_Natural8Value R_String_getByteAt(R_String const* self, R_SizeValue index)

Get the Byte value at the specified index.

Parameters
R_String* selfA pointer to this string.
R_SizeValue indexThe index. Must be within the bounds [0,n) where n is the size, in Bytes, of this string.
Return Value

The Byte value.

toBoolean

R_BooleanValue R_String_toBoolean(R_String const* self)

Interprete the symbols of this string as boolean literal and convert the boolean represented by that literal into an R_BooleanValue.

Parameters
R_String* selfA pointer to this string.
Return Value

The boolean value.

Errors
R_Status_ArgumentTypeInvalid self is a null pointer.
R_Status_ConversionFailed The symbols of this string cannot be interpreted as a boolean literal. Valid boolean literals are true and false, both case sensitve.
toInteger16

R_Integer16Value R_String_toInteger16(R_String const* self)

Interprete the symbols of this string as decimal integer literal and convert the number represented by that integer literal into an R_Integer16Value.

Parameters
R_String* selfA pointer to this string.
Return Value

The integer value.

Errors
R_Status_ArgumentTypeInvalid self is a null pointer.
R_Status_ConversionFailed The symbols of this string cannot be interpreted as a decimal integer literal or the number represented by the literal cannot be represented a value of type R_Integer16Value.
toInteger32

R_Integer32Value R_String_toInteger32(R_String const* self)

Interprete the symbols of this string as decimal integer literal and convert the number represented by that literal into an R_Integer32Value.

Parameters
R_String* selfA pointer to this string.
Return Value

The integer value.

Errors
R_Status_ArgumentTypeInvalid self is a null pointer.
R_Status_ConversionFailed The symbols of this string cannot be interpreted as a decimal integer literal or the number represented by the literal cannot be represented a value of type R_Integer32Value.
toInteger64

R_Integer64Value R_String_toInteger64(R_String const* self)

Interprete the symbols of this string as decimal integer literal and convert the number represented by that literal into an R_Integer64Value.

Parameters
R_String* selfA pointer to this string.
Return Value

The integer value.

Errors
R_Status_ArgumentTypeInvalid self is a null pointer.
R_Status_ConversionFailed The symbols of this string cannot be interpreted as a decimal integer literal or the number represented by the literal cannot be represented a value of type R_Integer64Value.
toInteger8

R_Integer8Value R_String_toInteger8(R_String const* self)

Interprete the symbols of this string as decimal integer literal and convert the number represented by that literal into an R_Integer8Value.

Parameters
R_String* selfA pointer to this string.
Return Value

The integer value.

Errors
R_Status_ArgumentTypeInvalid self is a null pointer.
R_Status_ConversionFailed The symbols of this string cannot be interpreted as a decimal integer literal or the number represented by the integer literal cannot be represented a value of type R_Integer8Value.
toNatural16

R_Natural16Value R_String_toNatural16(R_String const* self)

Interprete the symbols of this string as decimal natural literal and convert the number represented by that literal into an R_Natural16Value.

Parameters
R_String* selfA pointer to this string.
Return Value

The natural value.

Errors
R_Status_ArgumentTypeInvalid self is a null pointer.
R_Status_ConversionFailed The symbols of this string cannot be interpreted as a decimal natural literal or the number represented by the literal cannot be represented a value of type R_Natural16Value.
toNatural32

R_Natural32Value R_String_toNatural16(R_String const* self)

Interprete the symbols of this string as decimal natural literal and convert the number represented by that literal into an R_Natural32Value.

Parameters
R_String* selfA pointer to this string.
Return Value

The natural value.

Errors
R_Status_ArgumentTypeInvalid self is a null pointer.
R_Status_ConversionFailed The symbols of this string cannot be interpreted as a decimal natural literal or the number represented by the literal cannot be represented a value of type R_Natural32Value.
toNatural64

R_Natural64Value R_String_toNatural16(R_String const* self)

Interprete the symbols of this string as a decimal natural literal and convert the number represented by that literal into an R_Natural64Value.

Parameters
R_String* selfA pointer to this string.
Return Value

The natural value.

Errors
R_Status_ArgumentTypeInvalid self is a null pointer.
R_Status_ConversionFailed The symbols of this string cannot be interpreted as a decimal natural literal or the number represented by the literal cannot be represented a value of type R_Natural64Value.
toNatural8

R_Natural8Value R_String_toNatural8(R_String const* self)

Interprete the symbols of this string as a decimal natural literal and convert the number represented by that literal into an R_Natural8Value.

Parameters
R_String* selfA pointer to this string.
Return Value

The natural value.

Errors
R_Status_ArgumentTypeInvalid self is a null pointer.
R_Status_ConversionFailed The symbols of this string cannot be interpreted as a decimal natural literal or the number represented by the literal cannot be represented a value of type R_Natural8Value.
toReal32

R_Real32Value R_String_toReal32(R_String const* self)

Interprete the symbols of this string as a decimal real literal and convert the number represented by that literal into an R_Real32Value.

Parameters
R_String* selfA pointer to this string.
Return Value

The R_Real32Value value.

Errors
R_Status_ArgumentTypeInvalid self is a null pointer.
R_Status_ConversionFailed The symbols of this string cannot be interpreted as a decimal real literal or the number represented by the literal cannot be represented a value of type R_Real32Value.
toReal64

R_Real64Value R_String_toReal64(R_String const* self)

Interprete the symbols of this string as a decimal real literal and convert the number represented by that literal into an R_Real64Value.

Parameters
R_String* selfA pointer to this string.
Return Value

The R_Real64Value value.

Errors
R_Status_ArgumentTypeInvalid self is a null pointer.
R_Status_ConversionFailed The symbols of this string cannot be interpreted as a decimal real literal or the number represented by the literal cannot be represented a value of type R_Real64Value.

R_VoidValue R_String_toVoid(R_String const* self)

Interprete the symbols of this string as a void literal and convert the void value represented by that literal into an R_VoidValue.

Parameters
R_String* selfA pointer to this string.
Return Value

The void value.

Errors
R_Status_ArgumentTypeInvalid self is a null pointer.
R_Status_ConversionFailed The symbols of this string cannot be interpreted as a void literal. The valid void literal is void, case sensitve.