| View previous topic :: View next topic |
| Author |
Message |
dmonckton Contributor


Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Wed Nov 08, 2006 5:43 pm Post subject: List in use? |
|
|
Hi
What's the best way to check if a list is in use? I tried....
| Code: |
if @count(1)
do something
end
|
But this gives an error if the list hasn't already been created.
All the other list functions seem to give an error if the list hasn't
already been created. I want to know if the list has been created
or not?
Thanks
David... |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Wed Nov 08, 2006 6:21 pm Post subject: |
|
|
You could use something like this:
| Code: |
option errortrap,nolist
if @count(1)
info "List exists"
end
exit
:nolist
if @equal(@error(),4)
info "List does not exist"
option errortrap
end
exit
|
_________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
dmonckton Contributor


Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Wed Nov 08, 2006 9:57 pm Post subject: |
|
|
Excellent!
That is just what I wanted.
Never used ERRORTRAP before! Cool.
Thanks
David... |
|
| Back to top |
|
 |
|