How to? user function

Oct 18, 2008
339
2
Hello -- are user function just 1 line? can they have logic in then and return a string? Thanks
 
May 20, 2008
11,405
99
Syracuse, NY, USA
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
Thread starter Title Forum Replies Date
x13 Function to get interface user-defined name? Support 10
p.f.moore Quoting arguments to a user defined function Support 4
GermanDirk How to? EVENTLOG Command with simple User Rights not functional Support 4
cgunhouse Standard User Account Issue Support 2
V Comments from a first-time user (TCC 26) Support 6
CWBillow Backing up a user profile Support 7
R Fixed Sendmail parameter /USER= does not work Support 4
B How can a user know the last 'true command' executed Support 1
A License Question for Single User Support 5
M User defined language file for Notepad++ ? Support 3
p.f.moore How to? User specific TCSTART (etc) files Support 15
Stefano Piccardi run as limited user Support 2
L How to load Tcmd into my private user directory? Support 2
C User error with low level file* commands Support 8
E Help out a new user Support 2
R No Error Message when running mklink as limited user Support 3
R _ADMIN is 1 for Limited User Support 0
B TCC doesn't run using another user Support 2
M Tab button to launch as different user Support 1
C 2 Problems from a new user Support 4
vefatica Documentation Function parameters Support 0
Jay Sage Documentation Function @DRIVE Missing in Help Lists Support 0
Joe Caverly How to? Get name of current LIBRARY function? Support 4
x13 WeekNum function? Support 3
Joe Caverly No blank line in TEXT...ENDTEXT in a LIBRARY function Support 8
cgunhouse Ctrl-C from within a library function Support 6
C email[string] function Support 10
R FUNCTION to count NUMBER of files matching a pattern and specific length/not length Support 4
Dick Johnson Using the @instr function Support 5
vefatica '}' in a library function? Support 3
D Can the argument to RETURN be a function expansion? Support 3
J Trouble with @full[] function. Support 3
Fross Quick Function Question Support 17
vefatica Quoting @Function parameters? Support 0
Joe Caverly Debugging a LIBRARY function Support 10
Steve Pitts Documentation @CAPI function summary Support 0
x13 %x$ in function Support 3
thorntonpg @eval function, interesting results any explanation? Support 3
vefatica Fixed Help @FUNCTION, missing paragraph Support 8
Mordachai Variable followed by function constantly failing... Support 5
nickles Call a complex function Support 13
M Fixed Cannot use the "Browse..." function in "Find files/text" dialogbox Support 2
R Function #IDOW returns only 2 characters Support 10
T scrput `` in alias or function Support 2
S International characters - TYPE vs %@LINE function Support 5
JohnQSmith WAD @REPEAT function Support 15
vefatica WAD Nested variable expansion in PDIR's @function[*]? Support 13
R In addition to ALIAS /Z and FUNCTION /Z, HISTORY /Z? Support 1
A pdir function usage Support 3
nikbackm FUNCTION with variable number of arguments Support 17

Similar threads