Re: Hi.
- Posted by "Igor Kachan" <kinz at peterlink.ru> Aug 02, 2004
- 406 views
Hi Jesse, Welcom! You wrote: ---------- > From: Jesse Duke <dark at cyax.com> > To: EUforum at topica.com > Subgect: Hi. > Sent: 2 aug 2004 y. 11:39 > > I just looked through the Euphoria demos. > Very nice. It appears to be a very good > rapid-prototyping language. Debugging > anything over 400 lines must be a b-tch > though... Debugging is the easiest thing in EU > I'm not used to it yet, but I've had > familiarity with other languages > such as C, so it's easy to modify the source > code. I made some tweaks > to one of the samples; it tends to work > smoother now. Here it is, if > anyone's interested. > Changes are marked in "--CHANGE: " > > - - - > > file c:\euphoria\demos\dos32\mouse.ex [snipped] > procedure beep(integer pitch) --CHANGE: This was irritating, so I > commented out the entire thing... > -- atom t --CHANGE > -- sound(pitch) --CHANGE > -- t = time() --CHANGE > -- while time() < t+0.07 do --CHANGE > -- end while --CHANGE > -- sound(0) --CHANGE > end procedure [snipped] Too many extra job... You can do, for example:
procedure beep(integer pitch) atom t return -- CHANGE sound(pitch) t = time() while time() < t+0.07 do end while sound(0) end procedure
And Euphoria will remind you about your change, when program is finished. Then you can -- return -- CHANGE to restore old good procedure. See, 'return' stands after 'atom t', this is an important thing about procedures and functions. Regards, Igor Kachan kinz at peterlink.ru