Conversion operators



      ansi2str      array2ptr      delegate2fnptr      f2d
      f2d_aligned      f2f      f2f_aligned      f2i
      f2i_ovf      f2iu      f2iu_ovf      f2l
      f2l_ovf      f2lu      f2lu_ovf      fix_i4_i
      fix_i4_u      i2b      i2b_aligned      i2b_ovf
      i2f      i2iu_ovf      i2l      i2p_lower
      i2s      i2s_aligned      i2s_ovf      i2ub
      i2ub_ovf      i2ul_ovf      i2us      i2us_ovf
      iu2b_ovf      iu2f      iu2i_ovf      iu2l
      iu2s_ovf      iu2ub_ovf      iu2us_ovf      l2f
      l2i      l2i_ovf      l2ui_ovf      l2ul_ovf
      lu2f      lu2i_ovf      lu2iu_ovf      lu2l_ovf
      refarray2ansi      refarray2utf8      str2ansi      str2utf8
      utf82str   


 ansi2str 
  ·  OperationConvert ansi char * to string
  ·  Format
prefix
ansi2str
  ·  Direct Format
{ansi2str}
  ·  Forms ansi2str = 255, 62 (0xFF, 0x3E)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type ptr. This pointer is interpreted as a character buffer that uses the platform's current locale settings. This buffer is converted into a string result, which is then pushed onto the stack as type ptr.
   · Notes This instruction is used to convert character buffers into C# strings during "PInvoke" marshalling operations.


 array2ptr 
  ·  OperationConvert an array into a pointer to its first element
  ·  Format
prefix
array2ptr
  ·  Direct Format
{array2ptr}
  ·  Forms array2ptr = 255, 65 (0xFF, 0x41)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type ptr. If value is not null, a pointer to the first element in the array is computed as result. The result is pushed onto the stack as type ptr.
   · Notes This instruction is used to convert C# arrays into C pointers during "PInvoke" marshalling operations.


 delegate2fnptr 
  ·  OperationConvert a delegate into a function pointer
  ·  Format
prefix
delegate2fnptr
  ·  Direct Format
{delegate2fnptr}
  ·  Forms delegate2fnptr = 255, 64 (0xFF, 0x40)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type delegate. The value is wrapped in a native closure to make it suitable for use as a C function pointer. The wrapped result is pushed onto the stack as type ptr.
   · Notes This instruction is used to convert C# delegates into C function pointers during "PInvoke" marshalling operations.


 f2d 
  ·  OperationConvert native float to float64
  ·  Format
f2d
  ·  Direct Format
{f2d}
  ·  Forms f2d = 131 (0x83)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type native float, truncated to float64, and then converted into a native float result. The result is pushed onto the stack.


 f2d_aligned 
  ·  OperationConvert native float to float64, aligned on a stack word boundary
  ·  Format
prefix
f2d_aligned
  ·  Direct Format
{f2d_aligned}
  ·  Forms f2d_aligned = 255, 58 (0xFF, 0x3A)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type native float. The float64 result is formed by truncating value to 64 bits. The result is stored in the top-most stack position so that it is aligned with the beginning of the stack word.
   · Notes This instruction is used to align a value prior to boxing it with the box instruction.

The float64 type may occupy less stack words than the original native float value. Excess stack words are popped from the stack.



 f2f 
  ·  OperationConvert native float to float32
  ·  Format
f2f
  ·  Direct Format
{f2f}
  ·  Forms f2f = 130 (0x82)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type native float, truncated to float32, and then converted into a native float result. The result is pushed onto the stack.


 f2f_aligned 
  ·  OperationConvert native float to float32, aligned on a stack word boundary
  ·  Format
prefix
f2f_aligned
  ·  Direct Format
{f2f_aligned}
  ·  Forms f2f_aligned = 255, 57 (0xFF, 0x39)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type native float. The float32 result is formed by truncating value to 32 bits. The result is stored in the top-most stack position so that it is aligned with the beginning of the stack word.
   · Notes This instruction is used to align a value prior to boxing it with the box instruction.

The float32 type may occupy less stack words than the original native float value. Excess stack words are popped from the stack.



 f2i 
  ·  OperationConvert native float to int32
  ·  Format
f2i
  ·  Direct Format
{f2i}
  ·  Forms f2i = 126 (0x7E)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type native float, and converted into an int32 result. The result is pushed onto the stack.


 f2i_ovf 
  ·  OperationConvert native float to int32 with overflow detection
  ·  Format
prefix
f2i_ovf
  ·  Direct Format
{f2i_ovf}
  ·  Forms f2i_ovf = 255, 51 (0xFF, 0x33)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type native float. If value is not representable as a 32-bit integer, then System.OverflowException is thrown. Otherwise result is value, converted to int32. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for int32.


 f2iu 
  ·  OperationConvert native float to uint32
  ·  Format
f2iu
  ·  Direct Format
{f2iu}
  ·  Forms f2iu = 127 (0x7F)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type native float, and converted into an uint32 result. The result is pushed onto the stack.


 f2iu_ovf 
  ·  OperationConvert native float to uint32 with overflow detection
  ·  Format
prefix
f2iu_ovf
  ·  Direct Format
{f2iu_ovf}
  ·  Forms f2iu_ovf = 255, 52 (0xFF, 0x34)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type native float. If value is not representable as an unsigned 32-bit integer, then System.OverflowException is thrown. Otherwise result is value, converted to uint32. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for uint32.


 f2l 
  ·  OperationConvert native float to int64
  ·  Format
f2l
  ·  Direct Format
{f2l}
  ·  Forms f2l = 128 (0x80)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type native float, and converted into an int64 result. The result is pushed onto the stack.


 f2l_ovf 
  ·  OperationConvert native float to int64 with overflow detection
  ·  Format
prefix
f2l_ovf
  ·  Direct Format
{f2l_ovf}
  ·  Forms f2l_ovf = 255, 53 (0xFF, 0x35)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type native float. If value is not representable as a 64-bit integer, then System.OverflowException is thrown. Otherwise result is value, converted to int64. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for int64.


 f2lu 
  ·  OperationConvert native float to uint64
  ·  Format
f2lu
  ·  Direct Format
{f2lu}
  ·  Forms f2lu = 129 (0x81)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type native float, and converted into an uint64 result. The result is pushed onto the stack.


 f2lu_ovf 
  ·  OperationConvert native float to uint64 with overflow detection
  ·  Format
prefix
f2lu_ovf
  ·  Direct Format
{f2lu_ovf}
  ·  Forms f2lu_ovf = 255, 54 (0xFF, 0x36)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type native float. If value is not representable as an unsigned 64-bit integer, then System.OverflowException is thrown. Otherwise result is value, converted to uint64. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for uint64.


 fix_i4_i 
  ·  OperationConvert a int32/native int pair of values into native int/native int
  ·  Format
prefix
fix_i4_i
  ·  Direct Format
{fix_i4_i}
  ·  Forms fix_i4_i = 255, 77 (0xFF, 0x4D)
  ·  Stack..., value1, value2 => ..., result, value2
   · Description Both value1 and value2 are popped from the stack as types int32 and native int respectively. The native int result is formed by sign-extending value1. Then, result and value2 are pushed onto the stack.
   · Notes This is typically used to promote CIL I4 values to I when used with a binary arithmetic operation.

On 32-bit platforms, this instruction will typically do nothing because the int32 and native int types will be identical.

There is no fix_i_i4 instruction because i2l can be used to acheive the same result on 64-bit platforms.



 fix_i4_u 
  ·  OperationConvert a uint32/native uint pair of values into native uint/native uint
  ·  Format
prefix
fix_i4_u
  ·  Direct Format
{fix_i4_u}
  ·  Forms fix_i4_u = 255, 78 (0xFF, 0x4E)
  ·  Stack..., value1, value2 => ..., result, value2
   · Description Both value1 and value2 are popped from the stack as types uint32 and native uint respectively. The native uint result is formed by zero-extending value1. Then, result and value2 are pushed onto the stack.
   · Notes This is typically used to promote CIL I4 values to U when used with a binary arithmetic operation.

On 32-bit platforms, this instruction will typically do nothing because the uint32 and native uint types will be identical.

There is no fix_u_i4 instruction because iu2l can be used to acheive the same result on 64-bit platforms.



 i2b 
  ·  OperationConvert int32 to int8
  ·  Format
i2b
  ·  Direct Format
{i2b}
  ·  Forms i2b = 115 (0x73)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32. The int32 result is formed by truncating value to 8 bits and then sign-extending it to 32 bits. The result is pushed onto the stack.


 i2b_aligned 
  ·  OperationConvert int32 to int8, aligned on a stack word boundary
  ·  Format
i2b_aligned
  ·  Direct Format
{i2b_aligned}
  ·  Forms i2b_aligned = 255, 55 (0xFF, 0x37)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32. The int32 result is formed by truncating value to 8 bits. The result is stored in the top-most stack position so that it is aligned with the beginning of the stack word.
   · Notes This instruction is used to align a value prior to boxing it with the box instruction.


 i2b_ovf 
  ·  OperationConvert int32 to int8 with overflow detection
  ·  Format
prefix
i2b_ovf
  ·  Direct Format
{i2b_ovf}
  ·  Forms i2b_ovf = 255, 34 (0xFF, 0x22)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32. The int32 result is formed by truncating value to 8 bits and then sign-extending it to 32 bits. The result is pushed onto the stack. If result does not have the same numeric value as value, then System.OverflowException is thrown.
   · Exceptions System.OverflowException -- Raised if value is out of range for int8.


 i2f 
  ·  OperationConvert int32 to native float
  ·  Format
i2f
  ·  Direct Format
{i2f}
  ·  Forms i2f = 121 (0x79)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32, and converted into a native float result. The result is pushed onto the stack.


 i2iu_ovf 
  ·  OperationConvert int32 to uint32 with overflow detection
  ·  Format
prefix
i2iu_ovf
  ·  Direct Format
{i2iu_ovf}
  ·  Forms i2iu_ovf = 255, 42 (0xFF, 0x2A)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32. If value is less than zero, then System.OverflowException is thrown. Otherwise result is value. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for uint32.


 i2l 
  ·  OperationConvert int32 to int64
  ·  Format
i2l
  ·  Direct Format
{i2l}
  ·  Forms i2l = 119 (0x77)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32. The int64 result is formed by sign-extending value to 64 bits. The result is pushed onto the stack.


 i2p_lower 
  ·  OperationConvert uint32 to ptr at some point lower down on the stack
  ·  Format
i2p_lower
N[1]
wide
i2p_lower
N[4]
  ·  Direct Format
{i2p_lower}
N
  ·  Forms f2d = 131 (0x83)
  ·  Stack..., value, val1, ..., valN => ..., result, val1, ..., valN
   · Description The value at stack word N positions down from the top of the stack is converted from uint32 into a ptr result. N == 0 indicates that value is on the top of the stack.
   · Notes This is typically used to convert CIL "I4" values into "I" values for use in unmanaged pointer operations.


 i2s 
  ·  OperationConvert int32 to int16
  ·  Format
i2s
  ·  Direct Format
{i2s}
  ·  Forms i2s = 117 (0x75)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32. The int32 result is formed by truncating value to 16 bits and then sign-extending it to 32 bits. The result is pushed onto the stack.


 i2s_aligned 
  ·  OperationConvert int32 to int16, aligned on a stack word boundary
  ·  Format
prefix
i2s_aligned
  ·  Direct Format
{i2s_aligned}
  ·  Forms i2s_aligned = 255, 56 (0xFF, 0x38)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32. The int32 result is formed by truncating value to 16 bits. The result is stored in the top-most stack position so that it is aligned with the beginning of the stack word.
   · Notes This instruction is used to align a value prior to boxing it with the box instruction.


 i2s_ovf 
  ·  OperationConvert int32 to int16 with overflow detection
  ·  Format
prefix
i2s_ovf
  ·  Direct Format
{i2s_ovf}
  ·  Forms i2s_ovf = 255, 38 (0xFF, 0x26)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32. The int32 result is formed by truncating value to 16 bits and then sign-extending it to 32 bits. The result is pushed onto the stack. If result does not have the same numeric value as value, then System.OverflowException is thrown.
   · Exceptions System.OverflowException -- Raised if value is out of range for int16.


 i2ub 
  ·  OperationConvert int32 to uint8
  ·  Format
i2ub
  ·  Direct Format
{i2ub}
  ·  Forms i2ub = 116 (0x74)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32. The int32 result is formed by truncating value to 8 bits and then zero-extending it to 32 bits. The result is pushed onto the stack.


 i2ub_ovf 
  ·  OperationConvert int32 to uint8 with overflow detection
  ·  Format
prefix
i2ub_ovf
  ·  Direct Format
{i2ub_ovf}
  ·  Forms i2ub_ovf = 255, 35 (0xFF, 0x23)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32. The int32 result is formed by truncating value to 8 bits and then zero-extending it to 32 bits. The result is pushed onto the stack. If result does not have the same numeric value as value, then System.OverflowException is thrown.
   · Exceptions System.OverflowException -- Raised if value is out of range for uint8.


 i2ul_ovf 
  ·  OperationConvert int32 to uint64 with overflow detection
  ·  Format
prefix
i2ul_ovf
  ·  Direct Format
{i2ul_ovf}
  ·  Forms i2ul_ovf = 255, 44 (0xFF, 0x2C)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32. If value is negative, then System.OverflowException is thrown. Otherwise result is value, zero-extended to 64 bits. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for uint64.


 i2us 
  ·  OperationConvert int32 to uint16
  ·  Format
i2us
  ·  Direct Format
{i2us}
  ·  Forms i2us = 118 (0x76)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32. The int32 result is formed by truncating value to 16 bits and then zero-extending it to 32 bits. The result is pushed onto the stack.


 i2us_ovf 
  ·  OperationConvert int32 to uint16 with overflow detection
  ·  Format
prefix
i2us_ovf
  ·  Direct Format
{i2us_ovf}
  ·  Forms i2us_ovf = 255, 39 (0xFF, 0x27)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int32. The int32 result is formed by truncating value to 16 bits and then zero-extending it to 32 bits. The result is pushed onto the stack. If result does not have the same numeric value as value, then System.OverflowException is thrown.
   · Exceptions System.OverflowException -- Raised if value is out of range for uint16.


 iu2b_ovf 
  ·  OperationConvert uint32 to int8 with overflow detection
  ·  Format
prefix
iu2b_ovf
  ·  Direct Format
{iu2b_ovf}
  ·  Forms iu2b_ovf = 255, 36 (0xFF, 0x24)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type uint32. If value is greater than 127, then System.OverflowException is thrown. Otherwise result is value. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for int8.


 iu2f 
  ·  OperationConvert uint32 to native float
  ·  Format
iu2f
  ·  Direct Format
{iu2f}
  ·  Forms iu2f = 122 (0x7A)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type uint32, and converted into a native float result. The result is pushed onto the stack.


 iu2i_ovf 
  ·  OperationConvert uint32 to int32 with overflow detection
  ·  Format
prefix
iu2i_ovf
  ·  Direct Format
{iu2i_ovf}
  ·  Forms iu2i_ovf = 255, 43 (0xFF, 0x2B)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type uint32. If value is greater than 2147483647, then System.OverflowException is thrown. Otherwise result is value. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for int32.


 iu2l 
  ·  OperationConvert uint32 to int64
  ·  Format
iu2l
  ·  Direct Format
{iu2l}
  ·  Forms iu2l = 120 (0x78)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type uint32. The int64 result is formed by zero-extending value to 64 bits. The result is pushed onto the stack.


 iu2s_ovf 
  ·  OperationConvert uint32 to int16 with overflow detection
  ·  Format
prefix
iu2s_ovf
  ·  Direct Format
{iu2s_ovf}
  ·  Forms iu2s_ovf = 255, 40 (0xFF, 0x28)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type uint32. If value is greater than 32767, then System.OverflowException is thrown. Otherwise result is value. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for int16.


 iu2ub_ovf 
  ·  OperationConvert uint32 to uint8 with overflow detection
  ·  Format
prefix
iu2ub_ovf
  ·  Direct Format
{iu2ub_ovf}
  ·  Forms iu2ub_ovf = 255, 37 (0xFF, 0x25)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type uint32. If value is greater than 255, then System.OverflowException is thrown. Otherwise result is value. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for uint8.


 iu2us_ovf 
  ·  OperationConvert uint32 to uint16 with overflow detection
  ·  Format
prefix
iu2us_ovf
  ·  Direct Format
{iu2us_ovf}
  ·  Forms iu2us_ovf = 255, 41 (0xFF, 0x29)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type uint32. If value is greater than 65535, then System.OverflowException is thrown. Otherwise result is value. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for uint16.


 l2f 
  ·  OperationConvert int64 to native float
  ·  Format
l2f
  ·  Direct Format
{l2f}
  ·  Forms l2f = 124 (0x7C)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int64, and converted into a native float result. The result is pushed onto the stack.
   · Notes The precision of the native float type is platform-dependent. On some platforms, it may be sufficient to represent all int64 values, and on other platforms it may round large values. Programs should not rely upon precise conversions from int64 to native float.


 l2i 
  ·  OperationConvert int64 to int32
  ·  Format
l2i
  ·  Direct Format
{l2i}
  ·  Forms l2i = 123 (0x7B)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int64. The int32 result is formed by truncating value to 32 bits. The result is pushed onto the stack.


 l2i_ovf 
  ·  OperationConvert int64 to int32 with overflow detection
  ·  Format
prefix
l2i_ovf
  ·  Direct Format
{l2i_ovf}
  ·  Forms l2i_ovf = 255, 45 (0xFF, 0x2D)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int64. If value is less than -2147483648, or greater than 2147483647, then System.OverflowException is thrown. Otherwise result is value, truncated to 32 bits. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for int32.


 l2ui_ovf 
  ·  OperationConvert int64 to uint32 with overflow detection
  ·  Format
prefix
l2ui_ovf
  ·  Direct Format
{l2ui_ovf}
  ·  Forms l2ui_ovf = 255, 46 (0xFF, 0x2E)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int64. If value is less than zero or greater than 4294967295, then System.OverflowException is thrown. Otherwise result is value, truncated to 32 bits. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for uint32.


 l2ul_ovf 
  ·  OperationConvert int64 to uint64 with overflow detection
  ·  Format
prefix
l2ul_ovf
  ·  Direct Format
{l2ul_ovf}
  ·  Forms l2ul_ovf = 255, 49 (0xFF, 0x31)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type int64. If value is less than zero, then System.OverflowException is thrown. Otherwise result is value. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for uint64.


 lu2f 
  ·  OperationConvert uint64 to native float
  ·  Format
lu2f
  ·  Direct Format
{lu2f}
  ·  Forms lu2f = 125 (0x7D)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type uint64, and converted into a native float result. The result is pushed onto the stack.
   · Notes The precision of the native float type is platform-dependent. On some platforms, it may be sufficient to represent all uint64 values, and on other platforms it may round large values. Programs should not rely upon precise conversions from uint64 to native float.


 lu2i_ovf 
  ·  OperationConvert uint64 to int32 with overflow detection
  ·  Format
prefix
lu2i_ovf
  ·  Direct Format
{lu2i_ovf}
  ·  Forms lu2i_ovf = 255, 47 (0xFF, 0x2F)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type uint64. If value is greater than 2147483647, then System.OverflowException is thrown. Otherwise result is value, truncated to 32 bits. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for int32.


 lu2iu_ovf 
  ·  OperationConvert uint64 to uint32 with overflow detection
  ·  Format
prefix
lu2iu_ovf
  ·  Direct Format
{lu2iu_ovf}
  ·  Forms lu2iu_ovf = 255, 48 (0xFF, 0x30)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type uint64. If value is greater than 4294967295, then System.OverflowException is thrown. Otherwise result is value, truncated to 32 bits. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for uint32.


 lu2l_ovf 
  ·  OperationConvert uint64 to int64 with overflow detection
  ·  Format
prefix
lu2l_ovf
  ·  Direct Format
{lu2l_ovf}
  ·  Forms lu2l_ovf = 255, 50 (0xFF, 0x32)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type uint64. If value is greater than 9223372036854775807, then System.OverflowException is thrown. Otherwise result is value. The result is pushed onto the stack.
   · Exceptions System.OverflowException -- Raised if value is out of range for int64.


 refarray2ansi 
  ·  OperationConvert a reference to an array of strings into a pointer to an array of ansi char * values
  ·  Format
prefix
refarray2ansi
  ·  Direct Format
{refarray2ansi}
  ·  Forms refarray2ansi = 255, 66 (0xFF, 0x42)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type ptr. The String[] object at the address value is retrieved. It is converted into a NULL-terminated C array of the same size, with all of the strings converted into the ANSI character encoding. Then a pointer to this array's reference is pushed as result.
   · Notes This instruction is used to marshal parameters of type ref String[] "PInvoke" marshalling operations. It is primarily intended for use with Gtk#.


 refarray2utf8 
  ·  OperationConvert a reference to an array of strings into a pointer to an array of utf8 char * values
  ·  Format
prefix
refarray2utf8
  ·  Direct Format
{refarray2utf8}
  ·  Forms refarray2utf8 = 255, 67 (0xFF, 0x43)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type ptr. The String[] object at the address value is retrieved. It is converted into a NULL-terminated C array of the same size, with all of the strings converted into the UTF-8 character encoding. Then a pointer to this array's reference is pushed as result.
   · Notes This instruction is used to marshal parameters of type ref String[] "PInvoke" marshalling operations. It is primarily intended for use with Gtk#.


 str2ansi 
  ·  OperationConvert string to ansi char *
  ·  Format
prefix
str2ansi
  ·  Direct Format
{str2ansi}
  ·  Forms str2ansi = 255, 60 (0xFF, 0x3C)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type string. The string is converted into a result character buffer using the underlying platform's current locale settings. A pointer to the buffer is pushed onto the stack as type ptr.
   · Notes This instruction is used to convert C# strings into character buffers during "PInvoke" marshalling operations.


 str2utf8 
  ·  OperationConvert string to utf8 char *
  ·  Format
prefix
str2utf8
  ·  Direct Format
{str2utf8}
  ·  Forms str2utf8 = 255, 61 (0xFF, 0x3D)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type string. The string is converted into a result character buffer using the UTF-8 encoding. A pointer to the buffer is pushed onto the stack as type ptr.
   · Notes This instruction is used to convert C# strings into character buffers during "PInvoke" marshalling operations.


 utf82str 
  ·  OperationConvert utf8 char * to string
  ·  Format
prefix
utf82str
  ·  Direct Format
{utf82str}
  ·  Forms utf82str = 255, 63 (0xFF, 0x3F)
  ·  Stack..., value => ..., result
   · Description The value is popped from the stack as type string. The string is converted into a result. character buffer using the UTF-8 encoding. A pointer to the buffer is pushed onto the stack as type ptr.
   · Notes This instruction is used to convert C# strings into character buffers during "PInvoke" marshalling operations.


Copyright © Southern Storm Software Pty Ltd 2002
Licensed under GNU FDL