Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
18 crawler(s) on-line.
 138 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 amigakit:  22 mins ago
 OneTimer1:  27 mins ago
 NutsAboutAmiga:  31 mins ago
 kolla:  43 mins ago
 Gunnar:  46 mins ago
 Comi:  1 hr 12 mins ago
 vox:  1 hr 58 mins ago
 zipper:  2 hrs 1 min ago
 BigD:  3 hrs 5 mins ago
 OlafS25:  3 hrs 7 mins ago

/  Forum Index
   /  Amiga Development
      /  [E] struct equivalent
Register To Post

PosterThread
r-tea 
[E] struct equivalent
Posted on 8-Mar-2017 21:58:47
#1 ]
Regular Member
Joined: 21-Nov-2004
Posts: 315
From: Zdzieszowice, Poland

Hi All.

What is the E equivalent of C struct definition?

I have a definition in my C code:

Quote:
struct DiskObject *appicon;


and don't know how to adapt it to AmigaE.

_________________
I miss draggable screens in MorphOS... and do you? I know I'm in a minority unfortunately.

 Status: Offline
Profile     Report this post  
Develin 
Re: [E] struct equivalent
Posted on 8-Mar-2017 22:10:24
#2 ]
Regular Member
Joined: 16-Mar-2006
Posts: 443
From: Karlstad, Sweden

@r-tea

I have a vague memory that you could use it like this is E :

appicon:PTR TO diskobject

I might be way off now though, it was at least 15 years I touched E lately =)

 Status: Offline
Profile     Report this post  
ChrisH 
Re: [E] struct equivalent
Posted on 8-Mar-2017 22:35:20
#3 ]
Elite Member
Joined: 30-Jan-2005
Posts: 6679
From: Unknown

Quote:
struct DiskObject *appicon;

@Develin Quote:
appicon:PTR TO diskobject

ALMOST correct! To be completely correct it would be:

DEF appicon:PTR TO diskobject

Last edited by ChrisH on 08-Mar-2017 at 10:35 PM.

_________________
Author of the PortablE programming language.
It is pitch black. You are likely to be eaten by a grue...

 Status: Offline
Profile     Report this post  
Hypex 
Re: [E] struct equivalent
Posted on 9-Mar-2017 12:37:05
#4 ]
Elite Member
Joined: 6-May-2007
Posts: 11180
From: Greensborough, Australia

@r-tea

To answer your question in E it is called an OBJECT. Not shouting on purpose but E likes capitals.

Unlike C an object can also have the properties of a C++ class.

Also, E does have #defines, but in proper use in E it uses CONSTs,

 Status: Offline
Profile     Report this post  
r-tea 
Re: [E] struct equivalent
Posted on 9-Mar-2017 21:20:32
#5 ]
Regular Member
Joined: 21-Nov-2004
Posts: 315
From: Zdzieszowice, Poland

Thanks guys. In which MODULE can I find the diskobject defined?

_________________
I miss draggable screens in MorphOS... and do you? I know I'm in a minority unfortunately.

 Status: Offline
Profile     Report this post  
Hypex 
Re: [E] struct equivalent
Posted on 10-Mar-2017 0:54:31
#6 ]
Elite Member
Joined: 6-May-2007
Posts: 11180
From: Greensborough, Australia

@r-tea

Should be here like the C header:
MODULE 'workbench/workbench'

 Status: Offline
Profile     Report this post  

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle