//
define a;
PROC main;
	$a = '1234567890';
//	$a = '';
	exec ip sub;
	exec ip subn;
	$a = '1‚Q34‚T‚U‚V89‚O';
	exec ip sub;
	RETURN $ERROR;
END PROC;

proc sub;
	print $a;
	print leng($a) "$a is 'L'";
	print lenb($a) "$a is 'LB'";
	print substr($a,1);
	print substr($a,1,5);
	print substr($a,4,5);
	print substrb($a,1);
	print substrb($a,1,5);
	print substrb($a,4,5);
	print left($a,0) left('',3);
	print leftb($a,0) leftb('',3);
	print right($a,0) right('',3);
	print rightb($a,3) rightb($a,0) rightb('',3);
	print right($a,3) right($a,0) right('',3);
	print strings('Aa',10) strings('Aa',0) strings('',10);
	print "$a substr '1,3'" "$a mid '1,3'";
	RETURN $ERROR;
END PROC;

proc subn;
	print substr($a,1.0);
	print substr($a,1,5.5);
	print substr($a,4.0f,5.0f);
	print left($a,1.0) left($a,1.0f);
	print right($a,1.0) right(a,3.0f);
	print strings('Aa',10.0) strings('Aa',10.0f);
	RETURN $ERROR;
END PROC;
