Login
Register
Menu
Home
Forum
JassDoc
Types
Functions
Variables
Help
Chat
Media
Search
Search posts
WC3 JASS.com
"The Jass Vault" plus vJASS and Zinc
WC3 Modding Information Center
Forum
Warcraft (WC3) Modding
Warcraft III Resources
Warcraft III Spells and Systems
Codes & Snippets
BoolexprUtils
Warcraft III:
Maps
Models
Skins
Icons
Spells / Systems
Tools
Tutorials
Snippets
JASS vJASS Spells and Systems
Tutorials
Chat @Discord
vJASS & Zinc Documentation
For the latest documentation about how it works vJASS and Zinc language layers for Warcraft III, please follow these links:
Jasshelper documentation
-
Zinc documentation
-
WC3 Optimizer documentation
BoolexprUtils
Codes & Snippets
Started by
AGD
Views
5798
Replies
1
Users
2
1
1
Pages:
1
Go Down
0 Members and 1 Guest are viewing this topic.
Rating
Average Score
- 5 / 5
«
Created: November 08, 2016, 08:54:43 AM by moyack
»
AGD
Newbie - level 1
Posts:
14
WC3 Models: 0
WC3 Tutorials: 0
WC3 Tools: 0
WC3 Maps: 0
WC3 Skins: 0
WC3 Icons: 0
WC3 Spells: 0
Reputation:
0
Just a Man in the Back
BoolexprUtils
on:
November 08, 2016, 08:04:14 AM
Category:
Execution
Language:
vJASS, ZINC
True and False BooleanExpressions
Credits goes to Vexorian for the first idea.
Vjass version
Code: jass
library
BoolexprUtils
globals
boolexpr
BOOLEXPR_TRUE
boolexpr
BOOLEXPR_FALSE
endglobals
private
module
Init
private
static
method
filterTrue
takes
nothing
returns
boolean
return
true
endmethod
private
static
method
filterFalse
takes
nothing
returns
boolean
return
false
endmethod
private
static
method
onInit
takes
nothing
returns
nothing
set
BOOLEXPR_TRUE =
Filter
(
function
thistype
.filterTrue)
set
BOOLEXPR_TRUE =
Filter
(
function
thistype
.filterFalse)
endmethod
endmodule
private
struct
S
extends
array
implement
Init
endstruct
endlibrary
Zinc version
Code: jass
//! zinc
library
BoolexprUtils {
public
boolexpr
BOOLEXPR_TRUE, BOOLEXPR_FALSE;
module
Init {
static
method
onInit
() {
BOOLEXPR_TRUE =
Filter
(
function
() ->
boolean
{
return
true
;});
BOOLEXPR_FALSE =
Filter
(
function
() ->
boolean
{
return
false
;});
}
}
struct
S
extends
array
{
module
Init;}
}
//! endzinc
«
Last Edit: December 19, 2017, 11:37:26 PM by moyack
»
moyack
Site Owner
Administrator
Posts:
964
WC3 Models: 20
WC3 Tutorials: 17
WC3 Tools: 19
WC3 Maps: 12
WC3 Skins: 0
WC3 Icons: 1
WC3 Spells: 16
Reputation:
1153
Site Admin - I love fix things
Re: BoolexprUtils
Reply #1 on:
November 08, 2016, 09:15:32 AM
simple, but effective
Good job!
WC3 Modding Information Center
Print
Pages:
1
Go Up
« previous
next »
WC3 Modding Information Center
Forum
Warcraft (WC3) Modding
Warcraft III Resources
Warcraft III Spells and Systems
Codes & Snippets
BoolexprUtils
PortaMx-SEF 1.54
|
PortaMx © 2008-2015
,
PortaMx corp.
Search
Username
Password
Always stay logged in
Forgot your password?