How about a handler like this:
on visitedTimes nr, fieldNm
if nr<1 then
put "You have not visited here yet" into field fieldNm
else if nr =1 then
put "You have visited here once" into field fieldNm
else if nr>=1 then
put "You have visited here"&&a&&"times" into field fieldNm
end if
end
and then you would call it with:
visitedTimes a, "visitedBasic_concept"
visitedTimes b, "visitedPhotoshop"
etc...
-----Ursprungligt meddelande-----
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]För Yo
Gomi
Skickat: den 8 januari 2001 09:04
Till: [EMAIL PROTECTED]
Ämne: <lingo-l> script too long
Hello lingo friends
Thank you so much for your help. I have yet another question.
Could anyone tell me how to shorten this script below? How do I create a
handler that can be used in a,b, and c?
if a<1 then
put "You have not visited here yet" into field "visitedBasic_concept"
else if a =1 then
put "You have visited here once" into field "visitedBasic_concept"
else if a>=1 then
put "You have visited here"&&a&&"times" into field
"visitedBasic_concept"
end if
if b<1 then
put "You have not visited here yet" into field "visitedPhotoshop"
else if b =1 then
put "You have visited here once" into field "visitedPhotoshop"
else if b>=1 then
put "You have visited here"&&b&&"times" into field "visitedPhotoshop"
end if
if c<1 then
put "You have not visited here yet" into field "visitedInput_and_output"
else if c=1 then
put "You have visited here once" into field "visitedInput_and_output"
else if c>=1 then
put "You have visited here"&&c&&"times" into field
"visitedInput_and_output"
end if
I have about 10 of them so it will be useful if I know more efficient way...
any suggestion greatly appreciated. thanks in advance. Yo
NB thanks for Kerry, Daniel and Mark for answering my previous question.
They were all helpful. Much appreciated.
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]