1. no GOTO

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

new topic     » topic index » view message » categorize

2. Re: no GOTO

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: no GOTO

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

new topic     » goto parent     » topic index » view message » categorize

4. Re: no GOTO

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

new topic     » goto parent     » topic index » view message » categorize

5. Re: no GOTO

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu