Platforms to show: All Mac Windows Linux Cross-Platform

Back to StackSingleMBS class.

StackSingleMBS.Bottom as single

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 3.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the bottom item of the stack and returns the value.
Example
dim s as new StackSingleMBS

call s.Push 5

MsgBox str(s.Bottom)

StackSingleMBS.clear

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Clears the stack.
Example
dim s as new StackSingleMBS

call s.Push 5

s.Clear

if s.IsEmpty then
MsgBox "OK"
end if

StackSingleMBS.close

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 3.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The destructor.

There is no need to call this method except you want to free all resources of this object now without waiting for Xojo to do it for you.

StackSingleMBS.Contains(o as single) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns true if one of the items on the stack is equal to the given single value.
Example
dim s as new StackSingleMBS

call s.Push 5

if s.Contains(5) then
MsgBox "found. OK"
else
MsgBox "not found. Failed"
end if

StackSingleMBS.Deep as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Counts how much items are on the stack.
Example
dim s as new StackSingleMBS

MsgBox str(s.Deep)

call s.Push 5

MsgBox str(s.Deep)

StackSingleMBS.Pop as single

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes the top item of the stack and returns the value.
Example
dim s as new StackSingleMBS

call s.Push 5

MsgBox str(s.Pop)

Returns 0 on any error.

StackSingleMBS.PopBottom as single

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 3.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes the bottom item of the stack and returns the value.
Example
dim s as new StackSingleMBS

call s.Push 5

MsgBox str(S.PopBottom)

StackSingleMBS.Push(o as single) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Pushs a value on the stack.
Example
dim s as new StackSingleMBS
call s.Push 5

Returns true if successfull.
May fail on low memory.

StackSingleMBS.Top as single

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the value of the top item on the stack.
Example
dim s as new StackSingleMBS

call s.Push 5

MsgBox str(S.Top)

Returns 0 on any error.

The items on this page are in the following plugins: MBS DataTypes Plugin.


The biggest plugin in space...