Re: put prog in forum .. how ?
- Posted by Selgor Nov 24, 2012
- 1084 views
Hello Derek.
I do this .
I put <eucode> on a line press enter. I put </eucode> on the next line press enter.
I put code in.
Then <eucode> on a line press enter. Put </eucode> on next line press enter.
And this is how it comes out.
I used to do this without any trouble.
Thanks in anticipation. Cheers.
-- BkCl3Bst.ex Polygons 2 -- ----------------------------- --include graphics.e without type_check include dos_rescue.ew as dos_rescue include select.e include machine.e include mouse.e dos_rescue:use_vesa(1) if graphics_mode(18) then end if constant X = 1, Y = 2 sequence config integer nlines, npoints, spacing, solid,klr,kol,kolr,key procedure stall() for i = 1 to 3750000 do end for end procedure procedure colour() --key = dos_rescue:get_key() --0if get_key() = 27 then abort(0) end if klr=rand(15) kol=rand(15) kolr=rand(15) if klr=kol or klr=kolr then colour() elsif kol=kolr or kol=klr then colour() elsif kolr=klr or kolr=kol then colour() end if -- key = dos_rescue:get_key() -- if get_key() = 27 then abort(0) end if bk_color(kolr) end procedure colour() --key = dos_rescue:get_key() --if get_key() = 27 then abort(0) end if procedure dun() -- key = dos_rescue:get_key() -- if get_key() = 27 then abort(0) end if mouse_pointer(0) mouse_events(2) if sequence(get_mouse()) then abort(0) end if end procedure procedure poly_pattern() sequence points,pts,deltas,dels,history,his config = video_config() pts=rand(repeat(config[VC_XPIXELS..VC_YPIXELS],npoints))+2 points = rand(repeat(config[VC_XPIXELS..VC_YPIXELS], npoints))+2 deltas = rand(repeat({2*spacing-1, 2*spacing-1}, npoints)) - spacing dels=rand(repeat({2*spacing-1,2*spacing-1},npoints))-spacing key = dos_rescue:get_key() if get_key() = 27 then abort(0) end if dun() history = {} his={} dos_rescue:clear_screen() --key = dos_rescue:get_key() -- if get_key() = 27 then abort(0) end if dun() key = dos_rescue:get_key() while get_key() != 27 do if length(history) >= nlines then polygon(0, solid, history[1]) history = history[2..nlines] --if get_key() = 27 then abort(0) end if dun() end if if length(his) >= nlines then polygon(0,solid,his[1]) his=his[2..nlines] end if --key = dos_rescue:get_key() --if get_key() = 27 then abort(0) end if polygon(klr,solid,pts) polygon(kol, solid, points) dun() history = append(history, points) his=append(his,pts) points += deltas pts+=dels --key = dos_rescue:get_key() -- if get_key() = 27 then abort(0) end if dun() for j = 1 to npoints do if points[j][X] <= 0 or points[j][X] >= config[VC_XPIXELS] then deltas[j][X] = -deltas[j][X] end if -- key = dos_rescue:get_key() -- if get_key() = 27 then abort(0) end if dun() if points[j][Y] <= 0 or points[j][Y] >= config[VC_YPIXELS] then deltas[j][Y] = -deltas[j][Y] end if -- key = dos_rescue:get_key() -- if get_key() = 27 then abort(0) end if dun() end for for j = 1 to npoints do if pts[j][X] <= 0 or pts[j][X] >= config[VC_XPIXELS] then dels[j][X] = -dels[j][X] end if -- key = dos_rescue:get_key() -- if get_key() = 27 then abort(0) end if dun() -- key = dos_rescue:get_key() -- if get_key() = 27 then abort(0) end if dun() if pts[j][Y] <= 0 or pts[j][Y] >= config[VC_YPIXELS] then dels[j][Y] = -dels[j][Y] end if end for if rand(101) = 1 then colour() end if -- was 201 dun() stall() -- key = dos_rescue:get_key() -- if get_key() = 27 then abort(0) end if end while end procedure key = dos_rescue:get_key() while get_key() != 27 do nlines = 6 npoints = 4 spacing = 15 solid=0 dun() poly_pattern() --key = dos_rescue:get_key() -- if get_key() = 27 then abort(0) end if dun() end while