1. user defined types
- Posted by wolfgang fritz <wolfritz at king.igs.net> Aug 28, 2000
- 461 views
- Last edited Aug 29, 2000
Would anyone know how much ( real-world ) execution overhead is involved in using 'user defined' types like the seq and int types defined in win32lib... ... the real question being, I guess, why aren't they used by win32lib ... ... only problem being, of course, the type-check failure in: if int/seq statements WF []
2. user defined types
- Posted by Derek Parnell <ddparnell at bigpond.com> Dec 21, 2002
- 465 views
Can anyone tell me what I'm doing wrong with this.. In a file I have these 4 lines -------types.e--------- global type int( integer i ) return integer(i) end type ------------------------- and in the testing file I have these three lines -----test1.ex-------- include types.e int Orange Orange = 5 ------------------------- however I get this message... test1.ex:2 int has not been declared int Orange Orange = 5 ^ ----------- Next I change the test1.ex file to read thus... -----test1.ex-------- global type int( integer i ) return integer(i) end type int Orange Orange = 5 ------------------ and it works fine. So it seems that the global scope of the type() function is not being carried thruogh correctly. ---------------- cheers, Derek Parnell
3. Re: user defined types
- Posted by jc at cowgar.com Dec 21, 2002
- 455 views
Very strange. I typed your code in exactly. All works fine here for me. I am running 2.3 on Windows. Jeremy --On Saturday, December 21, 2002 7:07 PM +1100 Derek Parnell <ddparnell at bigpond.com> wrote: > > Can anyone tell me what I'm doing wrong with this.. > > In a file I have these 4 lines > -------types.e--------- > global type int( integer i ) > return integer(i) > end type > > ------------------------- > and in the testing file I have these three lines > -----test1.ex-------- > include types.e > int Orange Orange = 5 > > ------------------------- > however I get this message... > > test1.ex:2 > int has not been declared > int Orange Orange = 5 > > ^ > > ----------- > Next I change the test1.ex file to read thus... > > -----test1.ex-------- > global type int( integer i ) > return integer(i) > end type > int Orange Orange = 5 > > ------------------ > and it works fine. > > So it seems that the global scope of the type() function is not being > carried thruogh correctly. > > ---------------- > cheers, > Derek Parnell > > > >
4. Re: user defined types
- Posted by Martin Stachon <martin.stachon at worldonline.cz> Dec 21, 2002
- 457 views
Derek, perhaps you are including a different types.e then you are expecting? (in \EUPHORIA\INCLUDE or in $EUINC ?) Martin > Very strange. I typed your code in exactly. All works fine here for me. I > am running 2.3 on Windows. > > Jeremy > > --On Saturday, December 21, 2002 7:07 PM +1100 Derek Parnell > <ddparnell at bigpond.com> wrote: > > > > > Can anyone tell me what I'm doing wrong with this.. > > > > In a file I have these 4 lines > > -------types.e--------- > > global type int( integer i ) > > return integer(i) > > end type > > > > ------------------------- > > and in the testing file I have these three lines > > -----test1.ex-------- > > include types.e > > int Orange Orange = 5 > > > > ------------------------- > > however I get this message... > > > > test1.ex:2 > > int has not been declared > > int Orange Orange = 5 > > > > ^ > > > > ----------- > > Next I change the test1.ex file to read thus... > > > > -----test1.ex-------- > > global type int( integer i ) > > return integer(i) > > end type > > int Orange Orange = 5 > > > > ------------------ > > and it works fine. > > > > So it seems that the global scope of the type() function is not being > > carried thruogh correctly. > > > > ---------------- > > cheers, > > Derek Parnell > > > > > > >
5. Re: user defined types
- Posted by Derek Parnell <ddparnell at bigpond.com> Dec 21, 2002
- 463 views
Thanks Martin, you got it right. I have two types.e files, and the EUINC path was referencing them in a different order than I assumed. ---------------- cheers, Derek Parnell ----- Original Message ----- From: "Martin Stachon" <martin.stachon at worldonline.cz> To: "EUforum" <EUforum at topica.com> Sent: Sunday, December 22, 2002 2:44 AM Subject: Re: user defined types > > Derek, > perhaps you are including a different types.e then you are expecting? > (in \EUPHORIA\INCLUDE or in $EUINC ?) > > Martin > > > Very strange. I typed your code in exactly. All works fine here for me. I > > am running 2.3 on Windows. > > > > Jeremy > > > > --On Saturday, December 21, 2002 7:07 PM +1100 Derek Parnell > > <ddparnell at bigpond.com> wrote: > > > > > > > > Can anyone tell me what I'm doing wrong with this.. > > > > > > In a file I have these 4 lines > > > -------types.e--------- > > > global type int( integer i ) > > > return integer(i) > > > end type > > > > > > ------------------------- > > > and in the testing file I have these three lines > > > -----test1.ex-------- > > > include types.e > > > int Orange Orange = 5 > > > > > > ------------------------- > > > however I get this message... > > > > > > test1.ex:2 > > > int has not been declared > > > int Orange Orange = 5 > > > > > > ^ > > > > > > ----------- > > > Next I change the test1.ex file to read thus... > > > > > > -----test1.ex-------- > > > global type int( integer i ) > > > return integer(i) > > > end type > > > int Orange Orange = 5 > > > > > > ------------------ > > > and it works fine. > > > > > > So it seems that the global scope of the type() function is not being > > > carried thruogh correctly. > > > > > > ---------------- > > > cheers, > > > Derek Parnell > > > > > > > > >