Re: print and get procedures

new topic     » goto parent     » topic index » view thread      » older message » newer message

Yes, I solved with:

In get.e

... 
char ch  -- the current character 
... 
changed to: 
... 
char ch  -- the current character 
ch = GET_EOF 
... 
 
... 
global function get(integer file) 
-- Read the string representation of a Euphoria object  
-- from a file. Convert to the value of the object. 
-- Return {error_status, value}. 
	input_file = file 
	input_string = 0 
	get_ch() 
	return Get() 
end function 
 
global function value(sequence string) 
-- Read the representation of a Euphoria object 
-- from a sequence of characters. Convert to the value of the object. 
-- Return {error_status, value). 
	input_string = string 
	string_next = 1 
	get_ch() 
	return Get() 
end function 
 
changed to: 
 
global function get(integer file) 
-- Read the string representation of a Euphoria object  
-- from a file. Convert to the value of the object. 
-- Return {error_status, value}. 
	input_file = file 
	input_string = 0 
	if ch = GET_EOF then 
		get_ch() 
	end if 
	return Get() 
end function 
 
global function value(sequence string) 
-- Read the representation of a Euphoria object 
-- from a sequence of characters. Convert to the value of the object. 
-- Return {error_status, value). 
	input_string = string 
	string_next = 1 
	if ch = GET_EOF then 
		get_ch() 
	end if 
	return Get() 
end function 

In std/get.e

... 
char ch  -- the current character 
... 
to: 
... 
char ch = GET_EOF -- the current character 
... 
 
function Get2() 
... 
	-- init 
	offset = string_next-1 
	get_ch() 
to 
	-- init 
	offset = string_next-1 
	-- get_ch() 
... 
 
function get_value(object target, integer start_point, integer answer_type) 
... 
	if answer_type = GET_SHORT_ANSWER then 
		get_ch() 
	end if 
	return call_func(answer_type, {}) 
end function 
 
to:  
	if ch = GET_EOF then 
		get_ch() 
	end if 
	return call_func(answer_type, {}) 
end function 

Seem it's works.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu