Re: functions...

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 62645
interpreted = N
texte = Now why didn't I think of that ? :) Stuart Tremain idfk web developments, sydney, australia On 21 Jul 2005, at 5:07 PM, Scott Anderson wrote: > By default, text variables created within a function are discarded > after the > function has finished. If you want to create a text variable within a > function that persists after the function completes, then you need to > explicitly set the variable scope to global. For example: > > [text scope=global]size_width=500[/text] > > > > -----Original Message----- > From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of > kalin mintchev > Sent: Wednesday, July 20, 2005 11:43 PM > To: WebDNA Talk > Subject: functions... > > > > hi all... trying to use webdna functions.... > > what's wrong with the code below? > > i get this: > *** [size_width]*** > *** [size_height]*** > *** [size_kb]*** > > > thanks.... > > > [function name=Sizes] > > [showif [the_name]^file1] > [text]size_width=500[/text] > [text]size_height=700[/text] > [text]size_kb=150000[/text] > [/showif] > > [showif [the_name]^file2] > [text]size_width=300[/text] > [text]size_height=300[/text] > [text]size_kb=80000[/text] > [/showif] > > [/function] > > [text]name=moo_f00++poo+file1_caca++[/text] > > [Sizes the_name=[name]] > >
*** [size_width]*** >
*** [size_height]*** >
*** [size_kb]*** > >
> > > > > ------------------------------------------------------------- > 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/ > > > ------------------------------------------------------------- > 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 digest@talk.smithmicro.com> > Web Archive of this list is at: http://webdna.smithmicro.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: functions... ( "kalin mintchev" 2005)
  2. Re: functions... ( Stuart Tremain 2005)
  3. Re: functions... ( "Scott Anderson" 2005)
  4. Re: functions... ( Stuart Tremain 2005)
  5. Re: functions... ( "kalin mintchev" 2005)
  6. Re: functions... ( Stuart Tremain 2005)
  7. functions... ( "kalin mintchev" 2005)
Now why didn't I think of that ? :) Stuart Tremain idfk web developments, sydney, australia On 21 Jul 2005, at 5:07 PM, Scott Anderson wrote: > By default, text variables created within a function are discarded > after the > function has finished. If you want to create a text variable within a > function that persists after the function completes, then you need to > explicitly set the variable scope to global. For example: > > [text scope=global]size_width=500[/text] > > > > -----Original Message----- > From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of > kalin mintchev > Sent: Wednesday, July 20, 2005 11:43 PM > To: WebDNA Talk > Subject: functions... > > > > hi all... trying to use webdna functions.... > > what's wrong with the code below? > > i get this: > *** [size_width]*** > *** [size_height]*** > *** [size_kb]*** > > > thanks.... > > > [function name=Sizes] > > [showif [the_name]^file1] > [text]size_width=500[/text] > [text]size_height=700[/text] > [text]size_kb=150000[/text] > [/showif] > > [showif [the_name]^file2] > [text]size_width=300[/text] > [text]size_height=300[/text] > [text]size_kb=80000[/text] > [/showif] > > [/function] > > [text]name=moo_f00++poo+file1_caca++[/text] > > [Sizes the_name=[name]] > >
*** [size_width]*** >
*** [size_height]*** >
*** [size_kb]*** > >
> > > > > ------------------------------------------------------------- > 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/ > > > ------------------------------------------------------------- > 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 digest@talk.smithmicro.com> > Web Archive of this list is at: http://webdna.smithmicro.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/ Stuart Tremain

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:

Strange intermittent WebDNA problems (2008) Is this possible, WebCat2.0 and checkboxes (1997) [ModDate] & [ModTime] ? (1997) using showpage and showcart commands (1996) detecting if var is blank? (2007) re: Large databases in WebCat (1997) calculating tax rates, mail order solutions and version 2 (1997) [WebDNA] OT - Selling Domain Names? (2009) [WebDNA] I'm stuck... :-( (2009) os 8.5 (1999) [protect] (2000) What do the &x=5&y=8 mean? (2002) WebDNA implementation of MD5 algorithm? (2003) Re:quit command on NT (1997) Encrypt broken on Mac 3.05b13?? (2000) This list needs a digest: rant, rave... (1997) Unexpected comparison behavior change in 4.5.1 (2003) Close Databases Crash? (1998) WebMerchant? (1998) WebCatalog NT beta 18 problem (1997)