Yes, Pierre that form does give a consistent count of the number of
lines in the variable.
However, the question remains about why the sort command is moving the
last cr to the first line which effectively adds a line at the
beginning of the variable. If the sort command is treating the last CR
as another line, then "number of lines in tTemp" should also and
always return 3 in this example. There remains some ambiguity about
how the engine treats the final dangling cr after "cat" in this
example. If the first line is Put "Dog" & cr & "Cat" into tTemp
then the problem doesn't occur. The biggest problem is that this is
different behavior from previous versions of Rev. In prior versions,
the number of lines in tTemp would always return 2 in the initial
example.
On Jul 2, 2009, at 2:48 PM, Pierre Sahores wrote:
Try this ;
Put "Dog" & cr & \
"Cat" & cr into tTemp
Put number of lines in word 1 to -1 of tTemp into tPreSortCount
sort tTemp
Put number of lines in word 1 to -1 of tTemp into tPostSortCount
Put "Pre-Sort, variable tTemp has" && tPreSortCount && "lines."&
return &\
"Post-Sort, variable tTemp has" && tPostSortCount && "lines."
Hope this help,
--
Pierre Sahores
mobile : 06 03 95 77 70
www.sahores-conseil.com
Le 2 juil. 09 à 20:24, Timothy Bleiler a écrit :
Hi,
The sort command in 3.5 seems to be adding lines to a variable. I
have a lot of old code that creates lists using a method like this
and I don't believe the problem occurs in earlier versions of rev.
Is this a reported bug or am I missing something?
To see the error, create a stack with a button, paste the following
code into the button and click on the button.
On MouseUp
Put "Dog" & cr & \
"Cat" & cr into tTemp
Put number of lines in tTemp into tPreSortCount
sort tTemp
Put number of lines in tTemp into tPostSortCount
Put "Pre-Sort, variable tTemp has" && tPreSortCount && "lines."&
return &\
"Post-Sort, variable tTemp has" && tPostSortCount && "lines."
End MouseUp
Tim Bleiler, Ph.D.
Instructional Designer, HSIT
University at Buffalo
Phone: 716-829-3867
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution