Contents:

 

 

Introduction


News blog


What is Servoy?


Getting Started


Comparison Servoy/VFP


Performance


How-To's

 

Code Reference

 

VFP2Servoy Toolkit

 

 

Contact / feedback

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BETWEEN() - globals.BETWEEN()



Determines whether the value of an expression is inclusively between the values of two expressions of the same type.

 

VFP code example

? BETWEEN("b", "a", "c")          && Outputs .T.
? BETWEEN("a", "b", "c")          && Outputs .F.
? BETWEEN("a", .NULL., "c")       && Outputs .NULL.
? BETWEEN("3", "1", "5")          && Outputs .T.
? BETWEEN(3, 1, 5)                && Outputs .T.
? BETWEEN(2, 1, 2)                && Outputs .T.

d1=DATE(2011,2,15)            
d2=DATE(2011,1,1)            
d3=DATE(2011,3,1)            

? BETWEEN(d1, d2, d3)             && Outputs .T.

 

Servoy code example

globals.BETWEEN("b", "a", "c");   // true
globals.BETWEEN("a", "b", "c");   // false
globals.BETWEEN("3", "1", "5");   // true
globals.BETWEEN(3, 1, 5);         // true
globals.BETWEEN(3, null, 5);      // null
globals.BETWEEN(2, 1, 2);         // true

var d1 = new Date(2011,2,1);
var d2 = new Date(2011,1,1);
var d3 = new Date(2011,3,1);
globals.BETWEEN(d1, d2, d3);      // true


Note: BETWEEN() is a function of the VFP2Servoy Toolkit

 

Conclusion

When you look at the code of the BETWEEN() function in the VFP2Servoy Toolkit you see that there is no easy way to do this in Servoy (or we haven't found it yet) so here using the function instead of the Servoy syntax saves time. 

 

 

External resources:

 

vfp plugin

 

ServoyWorld 2012 pics

 

Official Servoy website

 

Ken Levy on Servoy

 

Servoy info

 

Servoy Forum

 

Servoy Documentation

 

VisualFoxpro.com © 2010-2012 • All rights reserved • Contact: info@visualfoxpro.com