math versus text

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 62884
interpreted = N
texte = Do text variables take precedence over math variables of the same name? Test 1: When I load a form and no user variables are submitted, I use [text] to assign variable "x" a default value. (a) I call function "y" and it works with the default [text] value. (b) In the same script, I later assign a [math] value to "x". When I call function "y", it uses the default value from the [text] assignment. I would have thought the math context would overwrite the [text] variable. Test 2: If I load the script a second time with formvariable "x", function "y" works both times as I expected. This means: (a) I call f(y) and it uses the formvariable with the name "x". (No default [text] value assigned.) (b) I later call f(y) and it uses the [math] variable "x". Test 3: Similar to Test 1 except that I use [text] instead of math in the second call to f(y). This gives the same result as Test 2, i.e. it works as I expected. Any ideas what is going on? Why would text work versus math? I've searched the archive to no avail. ------------------------------------------------------------- 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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. math versus text ( devaulw@onebox.com 2005)
Do text variables take precedence over math variables of the same name? Test 1: When I load a form and no user variables are submitted, I use [text] to assign variable "x" a default value. (a) I call function "y" and it works with the default [text] value. (b) In the same script, I later assign a [math] value to "x". When I call function "y", it uses the default value from the [text] assignment. I would have thought the math context would overwrite the [text] variable. Test 2: If I load the script a second time with formvariable "x", function "y" works both times as I expected. This means: (a) I call f(y) and it uses the formvariable with the name "x". (No default [text] value assigned.) (b) I later call f(y) and it uses the [math] variable "x". Test 3: Similar to Test 1 except that I use [text] instead of math in the second call to f(y). This gives the same result as Test 2, i.e. it works as I expected. Any ideas what is going on? Why would text work versus math? I've searched the archive to no avail. ------------------------------------------------------------- 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://webdna.smithmicro.com/ devaulw@onebox.com

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:

Fields/Forms Processing (1998) [WebDNA] =?windows-1252?Q?Re=3A_=5BWebDNA=5D_WebDNA_v7_questions_=85=2E?= (2011) emailer suddenly stops (1998) Webcat table size. (2001) WebDNA + SQL Server (2003) RE: Ongoing group search problems ... (1997) Tab Charactor (1997) Unexpected comparison behavior change in 4.5.1 (2003) Need help with emailer- 2 issues (1997) Running _every_ page through WebCat-error.html (1997) AE aware WebCatalog.acgi? (1997) IPADDRESS mystery (2003) Include a big block of text (1997) PCS Emailer's role ? (1997) shipcost (1997) tcpconnect feature request .. (2003) form data submission gets truncated (1997) REPOST: Upgrage pricing... The future of WebCatalog iscoming with 4.0... (2000) WebCatalog NT beta 18 problem (1997) Ampersand (1997)