Re: An Isnumeric function of some kind
This WebDNA talk-list message is from 2001
It keeps the original formatting.
numero = 37067
interpreted = N
texte = To test whether a variable is numeric, try:[showif [url][myVar][/url]=[math][myVar][/math]] ... [myVar] is numeric ...[/showif]Note that this is not perfect, but it works great for values that don't contain insignificant leading or trailing zeroes...123 is fine123.45 is fine123.450 will show as not numeric, because the trailing zero will be stripped00123 will similarly show as not numeric$123.45 will show as not numeric because of the dollar signIf you can live with these limitations, you're set. Otherwise, this may serve as a starting point for your specific situation.- brianAt 10:27 AM 7/10/2001, Andrew Simpson wrote:>I am looping through a found items creating field names in one table from>the manipulated rows of another.>>The Idea is to Add all the values from the columns in the stats table,>seperated by prefix eg V or C and add up each months worth of numbers>>EG...>>Search stats >//Contains VJAN, CJAN, VFEB, CFEB, VMAR as column headers with numbers in>//each row.>>found items>>search month db >//Contains months January February March April ...ETC>>[textshow=t]ShortMonth=[getchars start=1&end=3][MONTH][/getchars][/text]>//gives JAN FEB MAR etc>>>//need to check if C+JAN = 39 and not CJAN for example>[showif [interpret][c[shortmonth]][/interpret]!]>[math show=t]count=count+[interpret][c[shortmonth]][/interpret][/math]>[/showif]>>>//ISNUMERIC FUNCTION REQUIRED HERE PLEASE>[showif [interpret][V[shortmonth]][/interpret]![shortmonth]]>[math show=t]Views=Views+[interpret][c[shortmonth]][/interpret][/math]>[/showif]>>/search>/founditems>/search-- <= Brian C. Fries, BrainScan Software http://www.brainscansoftware.com =>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
To test whether a variable is numeric, try:[showif [url][myVar][/url]=[math][myVar][/math]] ... [myVar] is numeric ...[/showif]Note that this is not perfect, but it works great for values that don't contain insignificant leading or trailing zeroes...123 is fine123.45 is fine123.450 will show as not numeric, because the trailing zero will be stripped00123 will similarly show as not numeric$123.45 will show as not numeric because of the dollar signIf you can live with these limitations, you're set. Otherwise, this may serve as a starting point for your specific situation.- brianAt 10:27 AM 7/10/2001, Andrew Simpson wrote:>I am looping through a found items creating field names in one table from>the manipulated rows of another.>>The Idea is to Add all the values from the columns in the stats table,>seperated by prefix eg V or C and add up each months worth of numbers>>EG...>>Search stats >//Contains VJAN, CJAN, VFEB, CFEB, VMAR as column headers with numbers in>//each row.>>found items>>search month db >//Contains months January February March April ...ETC>>[textshow=t]ShortMonth=[getchars start=1&end=3][MONTH][/getchars][/text]>//gives JAN FEB MAR etc>>>//need to check if C+JAN = 39 and not CJAN for example>[showif [interpret][c[shortmonth]][/interpret]!]>[math show=t]count=count+[interpret][c[shortmonth]][/interpret][/math]>[/showif]>>>//ISNUMERIC FUNCTION REQUIRED HERE PLEASE>[showif [interpret][V[shortmonth]][/interpret]![shortmonth]]>[math show=t]Views=Views+[interpret][c[shortmonth]][/interpret][/math]>[/showif]>>/search>/founditems>/search-- <= Brian C. Fries, BrainScan Software http://www.brainscansoftware.com =>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Brian Fries
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
suffix mapping, use of cache, etc. (1997)
Opinion: [input] should be called [output] ... (1997)
Why would prices no appear in cart (2000)
WebCatalog dying in WebTen (1998)
includes and cart numbers (1997)
Fun with dates (1997)
[Fwd: F3 database munching] (1997)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
Sendmail on OSX/Communigate Pro (2002)
WebCatalog for Postcards ? (1997)
HELP! Search finding too much! (1998)
US Postal Service API (2007)
&fieldsdir=ra truely random?? (2000)
WC2.0 Memory Requirements (1997)
PIXO support (1997)
absolute paths for databases? (1997)
Cart date/time (2006)
ReturnRaw context (1997)
[GROUPS] followup (1997)
New Web Site Developers Database (1996)