Click Here
home features news forums classifieds faqs links search
5582 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
Channel: #Amigaworld
Channel Policy and Guidelines

(Uses JAVA Applet and Port 1024)
Visit the Chatroom Website

Who's Online
 86 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 NutsAboutAmiga:  9 mins ago
 pavlor:  18 mins ago
 tlosm:  18 mins ago
 Drewlio77:  21 mins ago
 QuikSanz:  32 mins ago
 tbreeden:  38 mins ago
 amigakit:  40 mins ago
 Seiya:  50 mins ago
 syrtran:  54 mins ago
 jtsiren:  58 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: 267
From: Opole, 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: 415
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: 6672
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.
I can usually be found on www.Amigans.net (my favourite Amiga forum).
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: 8406
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: 267
From: Opole, 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: 8406
From: Greensborough, Australia

@r-tea

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

 Status: Offline
Profile     Report this post  

[ home ][ about us ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright 2000 - 2017 Amigaworld.net.

Amigaworld.net was originally founded by David Doyle