Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How to check if label exists?

Feb
61
1
I'm in a situation where I'd like to do:

goto %label

and %label is user-input. So it could not exist. Is there a way to validate %label and make sure it is valid? Or should I just catch the error?
 
You could probably make this more robust. The file in question has the label (actually a subroutine)

Code:
:makevbs [file]

Code:
v:\> ffind /q /t":fakevbs" sv.btm & echo %_?
2

v:\> ffind /q /t":makevbs" sv.btm & echo %_?
0
 

Similar threads

Back
Top