How to? user function

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
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:
v:\> function factors `%@execstr[v:\factor.btm %1]`
v:\> echo %@factors[40]
v:\> echo %@factors[99]