proc exbase10
	filen	convert.icn
	local	0,001000,i
	local	1,001000,j
	local	2,000020,s
	local	3,000020,d
	local	4,000020,sign
	local	5,000040,digits
	local	6,000000,stop
	con	0,002000,1,2
	con	1,010000,21,052,052,052,040,142,141,163,145,040,157,165,164,040,157,146,040,162,141,156,147,145
	con	2,002000,1,0
	con	3,010000,1,055
	con	4,010000,0
	con	5,002000,1,9
	con	6,002000,1,1
	declend
	line	28
	colm	11
	init	L1
	mark	L1
	pnull
	var	5
	pnull
	pnull
	line	32
	colm	22
	keywd	digits
	line	32
	colm	33
	keywd	lcase
	line	32
	colm	30
	cat
	line	32
	colm	43
	keywd	ucase
	line	32
	colm	40
	cat
	line	32
	colm	19
	asgn
	unmark
lab L1
	mark	L2
	mark0
	mark	L3
	pnull
	pnull
	int	0
	var	1
	line	34
	colm	13
	numle
	pnull
	var	5
	line	34
	colm	21
	size
	line	34
	colm	18
	numle
	unmark
	efail
lab L3
	pnull
	unmark
	var	6
	str	1
	line	34
	colm	39
	invoke	1
	unmark
lab L2
	mark	L4
	mark0
	pnull
	var	0
	int	2
	line	36
	colm	9
	numeq
	unmark
	mark	L5
	int	2
	line	36
	colm	18
	pret
lab L5
	pfail
	unmark
lab L4
	mark	L6
	mark	L7
	pnull
	var	0
	int	2
	line	38
	colm	9
	numlt
	unmark
	mark	L9
	pnull
	var	4
	str	3
	line	39
	colm	12
	asgn
	unmark
lab L9
	pnull
	var	0
	pnull
	var	0
	line	40
	colm	12
	neg
	line	40
	colm	9
	asgn
	goto	L8
lab L7
	pnull
	var	4
	str	4
	line	42
	colm	14
	asgn
lab L8
	unmark
lab L6
	mark	L10
	pnull
	var	2
	str	4
	line	43
	colm	6
	asgn
	unmark
lab L10
	mark	L11
lab L12
	mark0
	pnull
	var	0
	int	2
	line	44
	colm	12
	numgt
	unmark
	mark	L12
	mark	L15
	pnull
	var	3
	pnull
	var	0
	var	1
	line	45
	colm	14
	mod
	line	45
	colm	9
	asgn
	unmark
lab L15
	mark	L16
	mark0
	pnull
	var	3
	int	5
	line	46
	colm	12
	numgt
	unmark
	pnull
	var	3
	pnull
	var	5
	pnull
	var	3
	int	6
	line	46
	colm	35
	plus
	line	46
	colm	32
	subsc
	line	46
	colm	23
	asgn
	unmark
lab L16
	mark	L17
	pnull
	var	2
	pnull
	var	3
	var	2
	line	47
	colm	14
	cat
	line	47
	colm	9
	asgn
	unmark
lab L17
	pnull
	var	0
	dup
	var	1
	line	48
	colm	9
	div
	asgn
lab L13
	unmark
	goto	L12
lab L14
	unmark
lab L11
	mark	L18
	mark	L19
	pnull
	var	4
	var	2
	line	51
	colm	16
	cat
	line	51
	colm	4
	pret
lab L19
	pfail
	unmark
lab L18
	pnull
	line	53
	colm	1
	pfail
	end
proc inbase10
	local	0,001000,s
	local	1,001000,i
	local	2,000000,stop
	local	3,000000,integer
	con	0,002000,2,36
	con	1,010000,33,052,052,052,040,142,141,163,145,040,164,157,157,040,154,141,162,147,145,040,146,157,162,040,151,156,142,141,163,145,061,060,050,051
	con	2,002000,1,1
	con	3,010000,1,055
	con	4,010000,1,162
	con	5,002000,1,2
	con	6,002000,1,0
	declend
	line	55
	colm	11
	mark	L1
	mark0
	pnull
	var	1
	int	0
	line	57
	colm	9
	numgt
	unmark
	var	2
	str	1
	line	57
	colm	23
	invoke	1
	unmark
lab L1
	mark	L2
	mark	L3
	pnull
	pnull
	var	0
	int	2
	line	59
	colm	8
	subsc
	str	3
	line	59
	colm	12
	lexeq
	unmark
	mark	L5
	pnull
	str	3
	var	3
	pnull
	pnull
	var	1
	str	4
	line	59
	colm	48
	cat
	pnull
	var	0
	int	5
	int	6
	line	59
	colm	61
	sect
	line	59
	colm	55
	cat
	line	59
	colm	45
	invoke	1
	line	59
	colm	35
	cat
	line	59
	colm	24
	pret
lab L5
	pfail
	goto	L4
lab L3
	mark	L6
	var	3
	pnull
	pnull
	var	1
	str	4
	line	60
	colm	26
	cat
	var	0
	line	60
	colm	33
	cat
	line	60
	colm	23
	invoke	1
	line	60
	colm	9
	pret
lab L6
	pfail
lab L4
	unmark
lab L2
	pnull
	line	62
	colm	1
	pfail
	end
proc radcon
	local	0,001000,s
	local	1,001000,i
	local	2,001000,j
	local	3,000000,exbase10
	local	4,000000,inbase10
	declend
	line	64
	colm	11
	mark	L1
	mark	L2
	var	3
	var	4
	var	0
	var	1
	line	66
	colm	28
	invoke	2
	var	2
	line	66
	colm	19
	invoke	2
	line	66
	colm	4
	pret
lab L2
	pfail
	unmark
lab L1
	pnull
	line	68
	colm	1
	pfail
	end
