Re: Req: Array Tags Explained, simple and clear

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 55152
interpreted = N
texte = On 2/1/04 11:54 AM, "Palle Bo Nielsen" wrote: > Are you saying that Array is irrelevant when you can use the Table > function? Which means they have the same strengths? Hi, I just found the messages from Smith Micro. I was posted my a worker of SmithMicro: > Good point. I think that other languages use arrays because they don't h= ave > a database that resides in memory. Scott's new [table] context can serve > the same purpose as arrays and with additional functionality. > According to Scott, "Internally, there is > allot more overhead (when using tables). The array context would be much > faster." And I just found another message in which he explained the array tag. Might help you more: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > Lets say you have a company that sells widgets with a price break. For > every widget, you could set up a one dimensional array to store the price= s > for 'Gold' (=3D1), 'Silver' (=3D2) and 'Bronze' (=3D3) "membership" levels. Yo= ur > array may look something like this: >=20 > [Widget(1)]=3D50 > [Widget(2)]=3D75 > [Widget(3)]=3D100 >=20 > For description purposes, I will show the names instead of the numbers. > This will make it easier to understand the code. >=20 > [Widget(gold)]=3D50 > [Widget(silver)]=3D75 > [Widget(bronze)]=3D100 >=20 > Your boss tells you that we are going international and we need to handle > prices for different "currencies". We need to display prices in 'dollars= ', > 'euros', sterling 'pounds' and 'yen'. Our array may look something like > this: >=20 > [Widget(gold,dollars)]=3D50 > [Widget(silver,dollars)]=3D75 > [Widget(bronze,dollars)]=3D100 > [Widget(gold,euros)]=3D60 > [Widget(silver,euros)]=3D85 > [Widget(bronze,euros)]=3D115 > [Widget(gold,pounds)]=3D25 > [Widget(silver,pounds)]=3D37 > [Widget(bronze,pounds)]=3D50 > [Widget(gold,yen)]=3D55 > [Widget(silver,yen)]=3D82 > [Widget(bronze,yen)]=3D110 >=20 > Now we can display the information based on membership and currency: >=20 > dollars euros pounds yen > gold 50 60 25 55 > silver 75 85 37 82 > bronze 100 115 50 110 >=20 > Okay, now your boss tells you that the price will change based on > "shiptocountry" location. He gave you this complicated chart that shows = the > price for each "membership/currency/shiptocountry" combination. No probl= em. > We will just add another dimension to our array to show > [Widget("membership","currency","shiptocountry")]. >=20 > Now our array looks like: >=20 > [Widget(gold,dollar,europe)]=3D55 > [Widget(gold,dollar,us)]=3D50 > ... >=20 > I think you get the idea. If your boss gives you another complicated cha= rt, > then it might be as easy as adding another dimension to your array. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D >=20 > Another use for arrays is for game programming. You can reference (x,y,z= ) > coordinates and store information about what is contained at that locatio= n. > Who knows? Maybe you will design a WebDNA version of "Quake". Hope this helps:-) Nitai -- Redakto - Content Management that simply works ComputerOil=AE GmbH Dammstrasse 7 5400 Baden / Switzerland Telefon +41 (0)844 44 55 66 info@computeroil.com http://computeroil.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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Req: Array Tags Explained, simple and clear ( Donovan Brooke 2004)
  2. Re: Req: Array Tags Explained, simple and clear ( Donovan Brooke 2004)
  3. Re: Req: Array Tags Explained, simple and clear ( "Nitai @ ComputerOil" 2004)
  4. Re: Req: Array Tags Explained, simple and clear ( Palle Bo Nielsen 2004)
  5. Re: Req: Array Tags Explained, simple and clear ( Palle Bo Nielsen 2004)
  6. Re: Req: Array Tags Explained, simple and clear ( "Nitai @ ComputerOil" 2004)
  7. Re: Req: Array Tags Explained, simple and clear ( "Nitai @ ComputerOil" 2004)
  8. Re: Req: Array Tags Explained, simple and clear ( Donovan Brooke 2004)
  9. Re: Req: Array Tags Explained, simple and clear ( Marc Kaiwi 2004)
  10. Re: Req: Array Tags Explained, simple and clear ( Palle Bo Nielsen 2004)
  11. Re: Req: Array Tags Explained, simple and clear ( Marc Kaiwi 2003)
  12. Re: Req: Array Tags Explained, simple and clear ( "Nitai @ ComputerOil" 2003)
  13. Re: Req: Array Tags Explained, simple and clear ( Palle Bo Nielsen 2003)
  14. Re: Req: Array Tags Explained, simple and clear ( "Scott Anderson" 2003)
  15. Re: Req: Array Tags Explained, simple and clear ( Palle Bo Nielsen 2003)
  16. Re: Req: Array Tags Explained, simple and clear ( Phillip Bonesteele 2003)
  17. Re: Req: Array Tags Explained, simple and clear ( Donovan Brooke 2003)
  18. Req: Array Tags Explained, simple and clear ( Palle Bo Nielsen 2003)
On 2/1/04 11:54 AM, "Palle Bo Nielsen" wrote: > Are you saying that Array is irrelevant when you can use the Table > function? Which means they have the same strengths? Hi, I just found the messages from Smith Micro. I was posted my a worker of SmithMicro: > Good point. I think that other languages use arrays because they don't h= ave > a database that resides in memory. Scott's new [table] context can serve > the same purpose as arrays and with additional functionality. > According to Scott, "Internally, there is > allot more overhead (when using tables). The array context would be much > faster." And I just found another message in which he explained the array tag. Might help you more: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > Lets say you have a company that sells widgets with a price break. For > every widget, you could set up a one dimensional array to store the price= s > for 'Gold' (=3D1), 'Silver' (=3D2) and 'Bronze' (=3D3) "membership" levels. Yo= ur > array may look something like this: >=20 > [Widget(1)]=3D50 > [Widget(2)]=3D75 > [Widget(3)]=3D100 >=20 > For description purposes, I will show the names instead of the numbers. > This will make it easier to understand the code. >=20 > [Widget(gold)]=3D50 > [Widget(silver)]=3D75 > [Widget(bronze)]=3D100 >=20 > Your boss tells you that we are going international and we need to handle > prices for different "currencies". We need to display prices in 'dollars= ', > 'euros', sterling 'pounds' and 'yen'. Our array may look something like > this: >=20 > [Widget(gold,dollars)]=3D50 > [Widget(silver,dollars)]=3D75 > [Widget(bronze,dollars)]=3D100 > [Widget(gold,euros)]=3D60 > [Widget(silver,euros)]=3D85 > [Widget(bronze,euros)]=3D115 > [Widget(gold,pounds)]=3D25 > [Widget(silver,pounds)]=3D37 > [Widget(bronze,pounds)]=3D50 > [Widget(gold,yen)]=3D55 > [Widget(silver,yen)]=3D82 > [Widget(bronze,yen)]=3D110 >=20 > Now we can display the information based on membership and currency: >=20 > dollars euros pounds yen > gold 50 60 25 55 > silver 75 85 37 82 > bronze 100 115 50 110 >=20 > Okay, now your boss tells you that the price will change based on > "shiptocountry" location. He gave you this complicated chart that shows = the > price for each "membership/currency/shiptocountry" combination. No probl= em. > We will just add another dimension to our array to show > [Widget("membership","currency","shiptocountry")]. >=20 > Now our array looks like: >=20 > [Widget(gold,dollar,europe)]=3D55 > [Widget(gold,dollar,us)]=3D50 > ... >=20 > I think you get the idea. If your boss gives you another complicated cha= rt, > then it might be as easy as adding another dimension to your array. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D >=20 > Another use for arrays is for game programming. You can reference (x,y,z= ) > coordinates and store information about what is contained at that locatio= n. > Who knows? Maybe you will design a WebDNA version of "Quake". Hope this helps:-) Nitai -- Redakto - Content Management that simply works ComputerOil=AE GmbH Dammstrasse 7 5400 Baden / Switzerland Telefon +41 (0)844 44 55 66 info@computeroil.com http://computeroil.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://webdna.smithmicro.com/ "Nitai @ ComputerOil"

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:

ERASING DATABASE (1997) taxTotal, too (1997) Thanks and Big News!!! (1997) Plugin or CGI or both (1997) Shell traceroute (2001) [Sum] function? (1997) Bug? (1997) multiple price line in formula.db (2004) Security Issues and WebCommerce Solution (1997) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) headers (2000) WebCat2b15MacPlugin - showing [math] (1997) Is there an easier way? (1998) WebCatalog NT beta 18 now available (1997) [listfiles] problems (1997) Bug Report, maybe (1997) Cart -> Date and Time (2004) SKU lookup (1997) WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997) Re:Emailer Set Up (1997)