Re: [dos] trouble with image.e
- Posted by Colin Taylor <ctaylor at RACSA.CO.CR> Jan 19, 2001
- 384 views
Your example appeared correct, so I tested it on my computer. It worked fine. Rob's example for get_screen_char() in Library.doc (which uses {s}) appears incorrect. - Colin Taylor ----- Original Message ----- From: John McAdam <johnmcadam at CLIX.PT> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Friday, January 19, 2001 6:42 AM Subject: [dos] trouble with image.e > Am I overlooking something really obvious or is my computer > somehow different? > > I was working on a little program and wanted to change a letter without > changing the screen colors. This trivial program snatch shows the > problem. This code always gives me the error "slice ends past end". > In this example it would be easy to manually reset the colors, but in > my program there are too many colors to keep track of. I should be > able to just get the colors off the screen. > > include graphics.e > include image.e > global sequence s s={0,0} > if graphics_mode(3) then abort(1) end if > --put a letter using text and background colors > position(10,10) text_color(12) bk_color(2) puts(1,'A') > --now put another letter but without changing the existing colors > s=get_screen_char(10,10) > s[1]='B' --s[2] should still have the colors > put_screen_char(10,10,s) > --why does slice end past end of sequence? >