Re: Arrays

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 34605
interpreted = N
texte = >[text]myArray[index]=[someValue][/text] > >Alas, I find nothing in the documentation or examples discussing this >apparent use of an indexed array within the [text] tag. Is this an >undocumented feature of the [text] tag? Is this similar to the use of >[Lineitems]?Arrays are 'faked' by creating a bunch of variables with similar names. In your example above, you are creating a bunch of text variables whose names are myArray1, myArray2, etc. The only 'trick' is to figure out how to get at those variables later, and for that you can use the [interpret] tag to force the name of the variable to be interpreted as if you had typed it by hand.[loop start=1&end=10] [text]myArray[index]=[math][index]*10[/math][/text] ^^^^^^^ this collapses to a number, thus creating myArray1 [/loop][loop start=1&end=10] [interpret][myArray[index]][/interpret] ^^^^^^^ this collapses to a number, thus creating [myArray1], which then gets interpreted [/loop]Technical Support ********************************** Smith Micro, Internet Solutions Div | eCommerce (WebCatalog) 16855 West Bernardo Drive, #380 | ------------------------- San Diego, CA 92127 | Software & Site Development WebCatalog Support: (858) 675-0632 | http://www.smithmicro.com Fax: (858) 675-0372 **********************************------------------------------------------------------------- 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:

    
  1. Re: [WebDNA] [ArrayGet] [ArraySet] (Donovan Brooke 2014)
  2. [WebDNA] [ArrayGet] [ArraySet] (Lawrence Banahan 2014)
  3. Re: [WebDNA] [arrayset name=array_1&dim=X,Y,Z] Margins (Palle Bo Nielsen 2012)
  4. Re: [WebDNA] [arrayset name=array_1&dim=X,Y,Z] Margins (Donovan Brooke 2012)
  5. Re: [WebDNA] [arrayset name=array_1&dim=X,Y,Z] Margins (Palle Bo Nielsen 2012)
  6. Re: [WebDNA] [arrayset name=array_1&dim=X,Y,Z] Margins (Donovan Brooke 2012)
  7. Re: [WebDNA] [arrayset name=array_1&dim=X,Y,Z] Margins (Donovan Brooke 2012)
  8. [WebDNA] [arrayset name=array_1&dim=X,Y,Z] Margins (Palle Bo Nielsen 2012)
  9. [WebDNA] WebDNA Associative Arrays? (Donovan Brooke 2012)
  10. Re: [WebDNA] exemple of [arrayset] & [arrayget] (Donovan Brooke 2012)
  11. Re: [WebDNA] exemple of [arrayset] & [arrayget] (Donovan Brooke 2012)
  12. Re: [WebDNA] exemple of [arrayset] & [arrayget] (Stuart Tremain 2012)
  13. [WebDNA] exemple of [arrayset] & [arrayget] (Banahan 2012)
  14. Would [arrayset] Work Here? ( Clint Davis 2005)
  15. Re: Boolean Tests with dereferenced arrays are broken in ( "Scott Anderson" 2003)
  16. Re: Boolean Tests with dereferenced arrays are broken in ( "Scott Anderson" 2003)
  17. Boolean Tests with dereferenced arrays are broken in WebDNA ( Bob Minor 2003)
  18. Re: Arrays (Sally 2000)
  19. Re: Arrays (John Peacock 2000)
  20. Re: Arrays (Sally 2000)
  21. Re: Arrays (John Peacock 2000)
  22. Re: Arrays (Kenneth Grome 2000)
  23. Re: Arrays (WebDNA Support 2000)
  24. Arrays (Sally 2000)
>[text]myArray[index]=[someValue][/text] > >Alas, I find nothing in the documentation or examples discussing this >apparent use of an indexed array within the [text] tag. Is this an >undocumented feature of the [text] tag? Is this similar to the use of >[lineitems]?Arrays are 'faked' by creating a bunch of variables with similar names. In your example above, you are creating a bunch of text variables whose names are myArray1, myArray2, etc. The only 'trick' is to figure out how to get at those variables later, and for that you can use the [interpret] tag to force the name of the variable to be interpreted as if you had typed it by hand.[loop start=1&end=10] [text]myArray[index]=[math][index]*10[/math][/text] ^^^^^^^ this collapses to a number, thus creating myArray1 [/loop][loop start=1&end=10] [interpret][myArray[index]][/interpret] ^^^^^^^ this collapses to a number, thus creating [myArray1], which then gets interpreted [/loop]Technical Support ********************************** Smith Micro, Internet Solutions Div | eCommerce (WebCatalog) 16855 West Bernardo Drive, #380 | ------------------------- San Diego, CA 92127 | Software & Site Development WebCatalog Support: (858) 675-0632 | http://www.smithmicro.com Fax: (858) 675-0372 **********************************------------------------------------------------------------- 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/ WebDNA Support

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:

[TCPConnect] questions/problems (2001) Another Excel Problem (2003) Exporting from Excel (1998) WebCat2b15MacPlugin - [protect] (1997) Forbidden CGI Error (1997) Occasional crashes with $remove (1997) WebCatalog 4.0.2b5 available (2000) Checking for blank form fields (sort of...) (1998) Reminder for beta testers (2000) using showpage and showcart commands (1996) Ok here is a question? (1997) bug in [SendMail] (1997) PDF Tools (2006) Clean Code: Rules for inserting keyboard returns? (1997) WebCat2b15MacPlugin - [protect] (1997) OT - AppleScript Request (2004) WebCatalog Mac and cgi-bin (WebSTAR 2.0) (1997) restart needed???? (1997) [LOOKUP] (1997) webcat feature request (1997)