[Rev] Problem with seemingly simple code

Dar Scott dsc at swcp.com
Sun Mar 24 00:35:01 EST 2002


On Saturday, March 23, 2002, at 07:49 PM, Ken Ray wrote:

> answer "Field 'in_field' contains: " & (field "in_field") & cr & \
>    "field 'waiting_reqs' contains: " & (the number of lines of 
> field "waiting reqs")

Checking the data is a good idea.  I get paranoid about spaces, 
though, and would do something like this:

answer "Field 'in_field' contains: [" & (field "in_field") & "]" & 
cr & \
    "field 'waiting_reqs' contains: " \
    & (the number of lines of field "waiting reqs")

(This does the same but bounds the value in brackets.)

Or better yet, include the length.

Field "in_field" might look empty but not be.

Dar Scott
bitten by non-printing characters




More information about the use-livecode mailing list