Next: , Previous: , Up: ByteArray   [Index]


1.14.6 ByteArray: more advanced accessing

charAt: index

Access the C char at the given index in the receiver. The value is returned as a Smalltalk Character. Indices are 1-based just like for other Smalltalk access.

charAt: index put: value

Store as a C char the Smalltalk Character or Integer object identified by ‘value’, at the given index in the receiver, using sizeof(char) bytes - i.e. 1 byte. Indices are 1-based just like for other Smalltalk access.

doubleAt: index

Access the C double at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

doubleAt: index put: value

Store the Smalltalk Float object identified by ‘value’, at the given index in the receiver, writing it like a C double. Indices are 1-based just like for other Smalltalk access.

floatAt: index

Access the C float at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

floatAt: index put: value

Store the Smalltalk Float object identified by ‘value’, at the given index in the receiver, writing it like a C float. Indices are 1-based just like for other Smalltalk access.

intAt: index

Access the C int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

intAt: index put: value

Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(int) bytes. Indices are 1-based just like for other Smalltalk access.

longAt: index

Access the C long int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

longAt: index put: value

Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(long) bytes. Indices are 1-based just like for other Smalltalk access.

longDoubleAt: index

Access the C long double at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

longDoubleAt: index put: value

Store the Smalltalk Float object identified by ‘value’, at the given index in the receiver, writing it like a C double. Indices are 1-based just like for other Smalltalk access.

objectAt: index

Access the Smalltalk object (OOP) at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

objectAt: index put: value

Store a pointer (OOP) to the Smalltalk object identified by ‘value’, at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

shortAt: index

Access the C short int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

shortAt: index put: value

Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(short) bytes. Indices are 1-based just like for other Smalltalk access.

stringAt: index

Access the string pointed by the C ‘char *’ at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

stringAt: index put: value

Store the Smalltalk String object identified by ‘value’, at the given index in the receiver, writing it like a *FRESHLY ALLOCATED* C string. It is the caller’s responsibility to free it if necessary. Indices are 1-based just like for other Smalltalk access.

ucharAt: index

Access the C unsigned char at the given index in the receiver. The value is returned as a Smalltalk Character. Indices are 1-based just like for other Smalltalk access.

ucharAt: index put: value

Store as a C char the Smalltalk Character or Integer object identified by ‘value’, at the given index in the receiver, using sizeof(char) bytes - i.e. 1 byte. Indices are 1-based just like for other Smalltalk access.

uintAt: index

Access the C unsigned int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

uintAt: index put: value

Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(int) bytes. Indices are 1-based just like for other Smalltalk access.

ulongAt: index

Access the C unsigned long int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

ulongAt: index put: value

Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(long) bytes. Indices are 1-based just like for other Smalltalk access.

unsignedCharAt: index

Access the C unsigned char at the given index in the receiver. The value is returned as a Smalltalk Character. Indices are 1-based just like for other Smalltalk access.

unsignedCharAt: index put: value

Store as a C char the Smalltalk Character or Integer object identified by ‘value’, at the given index in the receiver, using sizeof(char) bytes - i.e. 1 byte. Indices are 1-based just like for other Smalltalk access.

unsignedIntAt: index

Access the C unsigned int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

unsignedIntAt: index put: value

Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(int) bytes. Indices are 1-based just like for other Smalltalk access.

unsignedLongAt: index

Access the C unsigned long int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

unsignedLongAt: index put: value

Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(long) bytes. Indices are 1-based just like for other Smalltalk access.

unsignedShortAt: index

Access the C unsigned short int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

unsignedShortAt: index put: value

Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(short) bytes. Indices are 1-based just like for other Smalltalk access.

ushortAt: index

Access the C unsigned short int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.

ushortAt: index put: value

Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(short) bytes. Indices are 1-based just like for other Smalltalk access.


Next: , Previous: , Up: ByteArray   [Index]