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? user function

Oct
356
2
Hello -- are user function just 1 line? can they have logic in then and return a string? Thanks
 
Hello -- are user function just 1 line? can they have logic in then and return a string? Thanks
Yes, they are one-liners.
Their purpose is to return a string. @IF[] can be useful in a user-defined function. There are tricks which may/may not work to your satisfaction. @EXECSTR[] will grab one line of output from an EXE or a BTM. For example:
Code:
v:\> function factors `%@execstr[v:\factor.btm %1]`
 
v:\> echo %@factors[40]
2,2,2,5
 
v:\> echo %@factors[99]
3,3,11
 

Similar threads

Back
Top