1. no GOTO
- Posted by don cole <doncole at pacbell.net> Nov 24, 2004
- 546 views
Can't the lack of GOTO in Euphoria be woker around with PROCEDURE which is really GOSUB. I have often thought about writing a Euphoria to Basic library for people familiar with basic but new to Euphoria. For example my VAL()
global function getdec(sequence seq) --returns a decimal given a sequence atom de sequence value_string value_string=value(seq[1..length(seq)]) de = value_string[2] return de end function
There's my first contributation. Somebody should add it. Don Cole SF
2. Re: no GOTO
- Posted by "Kat" <gertie at visionsix.com> Nov 24, 2004
- 490 views
On 23 Nov 2004, at 17:59, don cole wrote: > > > posted by: don cole <doncole at pacbell.net> > > > Can't the lack of GOTO in Euphoria be woker around with PROCEDURE which is > really GOSUB. If you really think that, you don't understand the problem. See the email archives for examples and past discussions. Kat
3. Re: no GOTO
- Posted by "Igor Kachan" <kinz at peterlink.ru> Nov 24, 2004
- 477 views
Don Cole wrote: > Can't the lack of GOTO in Euphoria be woker around with PROCEDURE which is > really GOSUB. These GOTOs in the Basic programs is one of hardest things for translation the old Basic programs into Euphoria. Programmer needs to rethink all Basic goto algorithms in terms of procedures, functions, Euphoria loops etc. There is no another way. But if that rethinking is done, Euphoria program shines! Rob keeps Euphoria without goto to avoid the simple replaceing of Basic crazy gotos by Euphoria crazy gotos. *Any* Euphoria program must shine, I do understand Rob. Euphoria is a new excellent high-level language for the modern and perspective End User. Goto operator is good simetimes for complicated low-level languages. > I have often thought about writing a Euphoria to Basic library for people > familiar with basic but new to Euphoria. > > For example my VAL() > > }}} <eucode> > global function getdec(sequence seq) --returns a decimal given a sequence > atom de > sequence value_string > value_string=value(seq[1..length(seq)]) > de = value_string[2] > return de > end function > > </eucode> {{{ I have some little experince about translation Basic to Euphoria. Why not to keep the almost Basic's syntax for such the library? Say,
global function VAL(sequence s) -- real code end function
Then Basic user can just write almost Basic program in Euphoria. I'm working on Basic/Euphoria DRAW procedure now and it is almost ready. Works for me on all SVGA Euphoria DOS32 modes. I'll submit it when it's ready. Rob has this my DRAW lib for testing with 2.5. > There's my first contributation. Somebody should add it. Good Luck! Regards, Igor Kachan kinz at peterlink.ru
4. Re: no GOTO
- Posted by don cole <doncole at pacbell.net> Nov 24, 2004
- 504 views
Igor Kachan wrote: > > > I have some little experince about translation Basic to Euphoria. > Why not to keep the almost Basic's syntax for such the library? > > Say, > > }}} <eucode> > global function VAL(sequence s) > -- real code > end function > </eucode> {{{ > > Then Basic user can just write almost Basic program > in Euphoria. > I thought of that but val,trim and other came up with conflict with other include files such as Win32lib. Don Cole Sf
5. Re: no GOTO
- Posted by "Igor Kachan" <kinz at peterlink.ru> Nov 24, 2004
- 538 views
- Last edited Nov 25, 2004
Don Cole wrote: > Igor Kachan wrote: > > > > > I have some little experince about translation Basic to Euphoria. > > Why not to keep the almost Basic's syntax for such the library? > > > > Say, > > > > }}} <eucode> > > global function VAL(sequence s) > > -- real code > > end function > > </eucode> {{{ > > > > Then Basic user can just write almost Basic program > > in Euphoria. > > > > I thought of that but val,trim and other came up with conflict > with other include files such as Win32lib. No, I think. You can use VAL, VAl, vAL, VaL, vAl etc. These all 'vals' are different for Euphoria but make sense for Basic programmer. And I do not think that someone will some time include Win32lib into his program, which includes Basic/Euphoria library. Then, we can use 'include as' form of inclusion to avoid conflicts. Regards, Igor Kachan kinz at peterlink.ru