(7 hours ago)bplus Wrote:Yes that is the basis of the line. My real question, can I mini sub-code the first parameter of the IFF (test comparison). I thought I could be fancy on the first statement. Since the IFF statements are separated by comma's. Only the last minicoding result is the real test. ie: (p<=10). I only happened to use instr as a question example. The minicoding could be almost anything and referencing other variables to manipulate. Hell for all intended purposes the first statement could be a sub-function call out. ie:(9 hours ago)doppler Wrote: 2. Can this statement be on one line: p=_iff(p=instr(thing$,"\"): p <= 10, p, p=0)
re: position of "\" must be less than 11 else make it zero
How about:
p=_iff(instr(thing$,"\") <= 10, instr(thing$,"\"), 0)
dim share x, p
p=_iff(test,p,p=0)
sub test
x=instr(thing$,"\")
if x<=10 the p=x
end sub
The whole idea of a sub maybe washed up