Hi all. There must be something obviously wrong with this snipit, but I can't see it. frown Why is the value of s1 being reset after the last assignment to its value from the prior bar? Thanks.
Code:
function run() {
	set(LOGFILE);
	if (Bar>5) quit();
	string s1	= "12345678901234567890";
	printf("\nBar,s1=%i,%s",Bar,s1);
	s1	= "00";
	printf("\nBar,s1=%i,%s",Bar,s1);
	s1	= "xx";
	printf("\nBar,s1=%i,%s",Bar,s1);
	s1	= "**";
	printf("\nBar,s1=%i,%s",Bar,s1);
	sprintf(s1,"%02d",3*Bar+7);
	printf("\nBar,s1=%i,%s",Bar,s1);
}