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.
 99 guest(s) on-line.
 1 member(s) on-line.


 Rob

You are an anonymous user.
Register Now!
 Rob:  2 mins ago
 amigagr:  5 mins ago
 _ThEcRoW:  15 mins ago
 Hypex:  18 mins ago
 amigakit:  31 mins ago
 Beamish2040:  46 mins ago
 Allanon:  56 mins ago
 OlafS25:  1 hr 33 mins ago
 AmigaMac:  1 hr 41 mins ago
 Maijestro:  2 hrs 31 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: 11208
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: 11208
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