1. sequence
- Posted by tone.skoda at siol.net May 28, 2002
- 430 views
This is a multi-part message in MIME format. ------=_NextPart_000_0020_01C206C7.B2C72790 charset="iso-8859-2" This is strange: =20 sequence s s =3D {1,2,3,4,5,6,7,8,9} s [2..4] =3D 99 ?s instead of displaying {1,99,5,6,7,8,9} it displays {1,99,99,99,5,6,7,8,9} it would be more logical if it would do the thing nr 1. AND: ?routine_id ("power") why is this -1? this is also not logical. I know why these two things do what they do but they are not logical, or = say intiuitive. ------=_NextPart_000_0020_01C206C7.B2C72790 Content-Type: text/html; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-2"> <META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>This is strange:</FONT></DIV> <DIV><FONT face=3DArial size=3D2> </FONT></DIV> <DIV><FONT face=3DArial size=3D2> sequence = s<BR> =20 s =3D {1,2,3,4,5,6,7,8,9}<BR> s [2..4] =3D=20 99<BR> ?s</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>instead of displaying = {1,99,5,6,7,8,9}</FONT></DIV> <DIV><FONT face=3DArial size=3D2>it displays = {1,99,99,99,5,6,7,8,9}<BR></FONT></DIV> <DIV><FONT face=3DArial size=3D2>it would be more logical if it would do = the thing=20 nr 1.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial><FONT size=3D2></FONT></FONT> </DIV> <DIV><FONT face=3DArial><FONT size=3D2>AND:</FONT></FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial><FONT size=3D2>?routine_id = ("power")</FONT></FONT></DIV> <DIV><FONT face=3DArial> <DIV><FONT face=3DArial><FONT size=3D2>why is this -1? this is also not=20 logical.</FONT></FONT></DIV> <DIV><FONT size=3D2></FONT> </DIV> <DIV><FONT size=3D2>I know why these two things do what they do but they = are not=20 ------=_NextPart_000_0020_01C206C7.B2C72790--
2. Re: sequence
- Posted by a.tammer at hetnet.nl May 28, 2002
- 441 views
Tone, You ASK Euphoria to change sequence [2,3 and 4] to be set to 99= if you do it this way Antoine
3. Re: sequence
- Posted by jluethje at gmx.de May 29, 2002
- 447 views
Hi Derek, <snip> > ------ Derek Replies: ----------- > I was surprised when I first came across the syntax : <SLICE> = <ATOM> : I > actually thought it wouldn't work 'cos I had been brainwashed into thinking > that when a target is a SLICE, the source had to be the same length. But > then I realised that an atom has no length and the syntax is analogous to > <SLICE> += <ATOM>. That is, each element in the SLICE is effected by the > atom value. Once I started to think that way, it became "intuitive" > I'm not sure if you know the technique for getting the effect of a > routine_id for a built-in function, but here is one way to do it... <snip> this was not the first time, that your mail was not just an answer to the asked question, but a small "lesson". As a beginner with Euphoria, I collect this mails, and so I get a growing tutorial. I just want to thank you for your comprehensive information. Best regards, Juergen
4. Re: sequence
- Posted by alexione at EUnet.yu May 30, 2002
- 443 views
>------------ > function BIpower(object x, object y) > return power(x,y) > end function > without warning > function power(object x, object y) > return BIpower(x,y) > end function > with warning > > constant r = routine_id("power") >-------------- > >Of course, it would be a lot more simple (for us users of the product) to >allow taking the routine_id of a built_in function/procedure. However, I >realise that the internal architecture of Euphoria actually makes this a >non-trivial exercise. > >---------- >Derek. Why not making internal.e which would come with standard EU, containing, "wrappers" to internal functions/procedures with some prefix in name, like: ---- internal.e ---- global function _power(object x, objext y) return power(x, y) end function ... ---- end of internal.e ---- This way, you can still use power to refere internal function, and have only one auxiliary function-call when you use call(routine_id("_power"), {x, y}) Alexa
5. Re: sequence
- Posted by jbrown105 at speedymail.org May 30, 2002
- 438 views
Good idea Alexa. I'll write one up and post it to this list soon. jbrown On 0, alexione at EUnet.yu wrote: > > >------------ > > function BIpower(object x, object y) > > return power(x,y) > > end function > > without warning > > function power(object x, object y) > > return BIpower(x,y) > > end function > > with warning > > > > constant r = routine_id("power") > >-------------- > > > >Of course, it would be a lot more simple (for us users of the product) to > >allow taking the routine_id of a built_in function/procedure. However, I > >realise that the internal architecture of Euphoria actually makes this a > >non-trivial exercise. > > > >---------- > >Derek. > > Why not making internal.e which would come with standard EU, containing, > "wrappers" to internal functions/procedures with some prefix in name, like: > > ---- internal.e ---- > global function _power(object x, objext y) > return power(x, y) > end function > > ... > ---- end of internal.e ---- > > This way, you can still use power to refere internal function, and have only > one > auxiliary function-call when you use call(routine_id("_power"), {x, y}) > > Alexa > -- http://fastmail.fm/ - Consolidate POP email and HotMail in one place