Login
Register
Menu
Home
Help
Search
rejetto forum
PROBLEMS? QUESTIONS? CLICK HERE!
rejetto forum
»
Software
»
HFS ~ HTTP File Server
»
HTML & templates
»
template macros: true and false
template macros: true and false
rejetto
·
4 ·
7154
« previous
next »
Print
Pages:
1
0 Members and 1 Guest are viewing this topic.
rejetto
Administrator
Tireless poster
Posts:
13523
template macros: true and false
on:
March 09, 2009, 11:50:31 PM
this is only for those who uses macros.
at the moment only the empty string and the zero string is considered to be "false".
any other value is true, as stated in the
documentation
.
i think that the zero value should not be just "0", but also "0.0" in case of non-integers, or "0000".
at the moment this is not.
but from next build any numeric value equal to zero will fit.
Mars
Operator
Tireless poster
Posts:
2068
Re: template macros: true and false
Reply #1 on:
March 10, 2009, 02:58:26 PM
juste missing the word 'false'
function isFalse(s:string):boolean;
begin result:=(s='') or (strToFloatDef(s,1) = 0) or (lowercase(trim(s)='false') end;
rejetto
Administrator
Tireless poster
Posts:
13523
Re: template macros: true and false
Reply #2 on:
March 11, 2009, 10:56:32 AM
so why not the word "no" ?
and "off" ? it would fit as well.
i'm just trying to keep it "low", because more values we have, more confusion can bring.
bacter
Operator
Tireless poster
Posts:
681
Re: template macros: true and false
Reply #3 on:
March 11, 2009, 05:35:23 PM
I think it's a good solution to use 0 and 0.0.
If words like false,no,off,nothing should be used, it would be better tu use a macro {.clear|
varname
.} , someting that can be done in [special:alias]: set to 0 !
your computer has no brain - use your own !
Print
Pages:
1
rejetto forum
»
Software
»
HFS ~ HTTP File Server
»
HTML & templates
»
template macros: true and false
Search
Username
Password
Always stay logged in
Forgot your password?