;sort strings to alphabetic 

		include	"baselibs.i"
		include	"baselibs1.i"
		include	"string.i"


		#define	MOUNT,10		;the mount of the arrays
		#define	LINE_LENGTH,40
		#define	OLD_MODE,1005
		variables
		
		array	char,string,MOUNT,LINE_LENGTH

	main()

	int	size,address,limit
	int	count,count1,count2,flag
	CPTR	conhandle
	CPTR	_string
	{
;addresses of the textfiles to pointers
		pointer	_string,=&,string
		func	conhandle,=,fopen,<"CON:0/100/640/100/**CLI_WINDOW**">,OLD_MODE
		if	conhandle,==,0,1
			{
			print	<"no open CON:">
			exit	0
			}
			ifend	1
		calc	_stdout,=,conhandle	;print text to a new window
 
;get lines for sorting

		calc	count,=,0
		while	count,!=,MOUNT,1
			{
			print	<"give a line  ">
			pointer	_string,=&,string,count,0
			func	size,=,getchar(),string		;don't give more than 39 characters
			calc	count,++
			}	1

;sort lines
		strsort		string,MOUNT
		

;print sorting lines in order

		print	<"sorting lines  ">

		calc	count,=,0
		while	count,!=,MOUNT,3
			{
			pointer	_string,=&,string,count,0		;the addres of the line
			print	_string
			print	<"  ">
			calc	count,++
			}	3	
		getchar()
		fclose	conhandle
	}
	end

