Re: AutoIt vs Euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message
begin said...

the following is a dumb example

                    typedef struct _ListCapsule { 
                      object andlist; 
                      object orlist; 
                      object rules; 
                      object certainties; 
                    } , 
one could encapsulate data, but may i think to much in other languages.

What about:

enum ANDLIST, 
     ORLIST, 
     RULES, 
     CERTAINTIES, 
     LISTCAPSULELEN = $ 
 
type ListCapsule(object o) 
    return sequence(o) and length(o)=LISTCAPSULELEN 
-- if you have also defined types for the elements: 
    -- and andlist(o[ANDLIST]) 
    -- and orlist(o[ORLIST]) 
    -- and rules(o[RULES]) 
    -- and certainties(o[CERTAINTIES]) 
end type 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu