W Wrapl, The Programming Language

Libraries Std.Address

Types

T

An addres in memory.

Constants

Nil : T

Functions

Compare(a @ T, b @ T) : Std.Object.T

FromRef(variable+) : T

Returns the address where variable is stored.

FromVal(value) : T

Returns the address of the object value.

Hash(a @ T) : Std.Integer.SmallT

New(size @ Std.Integer.SmallT) : T

Allocates size bytes of memory and returns its address.

NewAtomic(size @ Std.Integer.SmallT) : T

Allocates size bytes of memory and returns its address.

ToRef(address @ T) : ANY

Returns an assignable reference to the memory at address

ToVal(address @ T) : ANY

Returns the object at address

_FromVal(value) : T

Returns the address of the data of value.

Methods

:">"(_ @ T, _ @ T)

:">="(_ @ T, _ @ T)

:"<"(_ @ T, _ @ T)

:"<="(_ @ T, _ @ T)

:"+"(_ @ T, _ @ Std.Integer.SmallT)

:"+"(_ @ Std.Integer.SmallT, _ @ T)

:"-"(_ @ T, _ @ T)

:"-"(_ @ T, _ @ Std.Integer.SmallT)

:"="(_ @ T, _ @ T)

:"@"(_ @ T, _ = Std.String.T)

:fill32(dst @ T, value @ Std.Integer.SmallT, count @ Std.Integer.SmallT)

Write count copies of value to dst.

:fill8(dst @ T, value @ Std.Integer.SmallT, count @ Std.Integer.SmallT)

Write count copies of value to dst.

:get(_ @ T, _ @ Std.Integer.SmallT)

:get(src @ T) : ANY

Returns the object whose address is stored at src.

:get16(_ @ T, _ @ Std.Integer.SmallT)

:get16(src @ T) : Std.Integer.SmallT

Returns the 16 bit int at src.

:get24(_ @ T, _ @ Std.Integer.SmallT)

:get24(src @ T) : Std.Integer.SmallT

Returns the 24 bit int at src.

:get32(_ @ T, _ @ Std.Integer.SmallT)

:get32(src @ T) : Std.Integer.SmallT

Returns the 32 bit int at src.

:get8(_ @ T, _ @ Std.Integer.SmallT)

:get8(src @ T) : Std.Integer.SmallT

Returns the byte at src.

:geta(_ @ T, _ @ Std.Integer.SmallT)

:geta(src @ T) : Std.Integer.SmallT

Returns the address stored at src.

:getf32(src @ T) : Std.Real.T

Returns the 32 bit float at src.

:getf64(src @ T) : Std.Real.T

Returns the 64 bit float at src.

:gets(src @ T, length @ Std.Integer.SmallT, offset @ Std.Integer.SmallT)

Returns a string composed of the length bytes at src.

:gets(src @ T, length @ Std.Integer.SmallT)

Returns a string composed of the length bytes at src.

:is0(_ @ T)

:put(dst @ T, string @ Std.String.T, offset @ Std.Integer.SmallT)

Writes the bytes in string at dst.

:put(dst @ T, string @ Std.String.T)

Writes the bytes in string at dst.

:put(_ @ T, _ @ Std.Object.T, _ @ Std.Integer.SmallT)

:put(dst @ T, object @ Std.Object.T)

Writes the address of object at dst.

:put(dst @ T, src @ T, length @ Std.Integer.SmallT, offset @ Std.Integer.SmallT)

Copies length bytes from src to dst + offset.

:put(dst @ T, src @ T, length @ Std.Integer.SmallT)

Copies length bytes from src to dst.

:put32(_ @ T, _ @ Std.Integer.SmallT, _ @ Std.Integer.SmallT)

:put32(dst @ T, int @ Std.Integer.SmallT)

Writes the int int at dst.

:put8(_ @ T, _ @ Std.Integer.SmallT, _ @ Std.Integer.SmallT)

:put8(dst @ T, int @ Std.Integer.SmallT)

Writes the byte int at dst.

:puta(_ @ T, _ @ Std.Integer.SmallT, _ @ Std.Integer.SmallT)

:puta(_ @ T, _ @ T)

:putf32(dst @ T, real @ Std.Real.T, offset @ Std.Integer.SmallT)

Writes the real real at dst as a 32 bit float.

:putf32(dst @ T, real @ Std.Real.T)

Writes the real real at dst as a 32 bit float.

:putf64(dst @ T, real @ Std.Real.T, offset @ Std.Integer.SmallT)

Writes the real real at dst as a 64 bit float.

:putf64(dst @ T, real @ Std.Real.T)

Writes the real real at dst as a 64 bit float.

:"~="(_ @ T, _ @ T)