Re: print and get procedures
- Posted by cargoan Jan 29, 2011
- 1192 views
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.