Re: foreach routine

new topic     » goto parent     » topic index » view thread      » older message » newer message

duke normandin wrote:
> 
> What I was going to say is:
> 
> CONTENT_LENGTH will either be empty or contain the number of chars/bytes
> sent. So 
> if atom(tmp) then
> 
> checks to see if getenv() returned a number, right? If true, we have that
> many chars/bytes. If 0 CONTENT_LENGTH was empty.
> 
> Do I need another cup of coffee? or something? It seems that the logic
> is backwards. TIA...  (now hit the send button, duke)
> --
> duke

The getenv() routine will return -1 if the environment variable CONTENT_LENGTH
doesn't exist. If it does exist, a string will be returned.
Since CONTENT_LENGTH is supposed to be a number, we use value() to convert the
string to a number.

value() also returns a sequence of length = 2, where the 1st element is an error
code and the 2nd is the actual number value.

Hence the 2 error checks.

HTH

Chris Bensler
~ The difference between ordinary and extraordinary is that little extra ~
http://empire.iwireweb.com - Empire for Euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu