Page 1 of 1
Turbointegrator string parameter - trim enter
Posted: Fri Apr 25, 2014 9:33 am
by Motyl
Hi
I have turbointegrator process, and it is lunched from web sheet. Parameters to process gets from cells, how to avoid putting enter sing from user (trim?)?
Re: Turbointegrator string parameter - trim enter
Posted: Fri Apr 25, 2014 9:37 am
by Alan Kirk
Motyl wrote:Hi
I have turbointegrator process, and it is lunched from web sheet. Parameters to process gets from cells, how to avoid putting enter sing from user (trim?)?
It's not clear what you're asking here.
"Trim" usually refers to removing leading and trailing spaces from a string (and there is a
rules function that you can use in TI to do that), but "avoid putting enter sing from user" is something that I can't reconcile with that.
Could you please clarify your question.
Re: Turbointegrator string parameter - trim enter
Posted: Fri Apr 25, 2014 3:19 pm
by iansdigby
I'm guessing the enquirer means how to remove the "Enter String" or carriage return character - ASCII code 13, from a passed parameter.
In theory, a string that contained a carriage return could be cleansed in TI with something like:
DELET( pString, SCAN( CHAR(13), pString), 1);
I haven't tried it though....
Re: Turbointegrator string parameter - trim enter
Posted: Fri Apr 25, 2014 7:47 pm
by Alan Kirk
iansdigby wrote:I'm guessing the enquirer means how to remove the "Enter String" or carriage return character - ASCII code 13, from a passed parameter.
In theory, a string that contained a carriage return could be cleansed in TI with something like:
DELET( pString, SCAN( CHAR(13), pString), 1);
I haven't tried it though....
I thought of that, but unlike an end of line in Word you aren't likely to find a carriage return at the end of a cell input. (In any case that's usually a CR/LF combination in Word.) Excel does use LF characters (ASCII 10, as opposed to CR ones) to separate lines in a multi-line text entry, but I'm not sure why something like that would (or should) need to be passed as a process parameter. In any case you need to work at doing that in Excel; you only get the LF character if you press [Alt]+[Enter], or if you manually add the character on via an CHAR() function. (Or possibly one other way that's on the tip of my brain but which I can't think of at the moment.) You only get a CR if you do the latter of those.
The question remains a mystery.