If it is used as a parameter type, the low eight bits of the parameter are converted to a Character whose numeric value is between 0 and 255. If it is used as a return type, the return value from the Smalltalk message must be a Character whose numeric value is between 0 and 255.If it is used as a parameter type, the low 16 bits of the parameter are converted to a Character. If it is used as a return type, the return value from the Smalltalk message must be a Character.If it is used as a parameter type, the low eight bits of the parameter are tested for 0. If they are 0, false is passed to the Smalltalk message. If they are not 0, true is passed. If it is used as a return type, only true or false can be converted. The return value is TRUE for true, and FALSE for false.@see pointerIf it is used as a parameter type, the low 8, 16, 32 or 64 bits of the parameter are converted to an Integer that is in the specified range. If it is used as a return type, the return value must be an Integer (see Returned parameters). The integer ranges are as follows:If it is used as a parameter type, the parameter is converted using uint32 conversion. If it is used as a return type, the return value must be a byte, word, or long object or a non-immediate OSObject. nil is returned as 0.If used as a parameter type, the parameter is converted using uint32 conversion on a 32-bit virtual machine or a uint64 conversion on a 64-bit virtual machine. If it is used as a return type, this is an amalgamation of struct, char, bool, and int type conversions. For a given parameter type, the conversion performed is as follows:If it is used as a parameter type, this is the same as pointer conversion. If it is used as a return type, the parameter can be a fixed byte, word, or long object. Instances of OSObject can also be supplied as the parameter provided they are non-immediate.If an OSObject whose reference is a byte, word, or long object is returned, the reference must be in fixed space. This is also true for byte, word, or long objects that are returned directly.For example, if the return type of a C function is a int * (i.e. pointer), then the return type of the associated platform function is best expressed as pointer. Defining the return type instead as an int16 is not only semantically incorrect, but it will also be functionally incorrect in many cases since the return value will be truncated to 16 bits.
![]() |