Re: foreach routine
- Posted by Chris Bensler <bensler at nt.net> Dec 22, 2006
- 677 views
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