Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who is Online
42 user(s) are online (37 user(s) are browsing Forum)

Members: 0
Guests: 42

more...


Browsing this Thread:   1 Anonymous Users






Re: EXPORT in module?
#2
Home away from home
Home away from home


See User information
Sorry, didn't see this message untill now (PM me if you need a quick reply to a new *thread*).

I removed EXPORT from PortablE, and replaced it with PUBLIC and PRIVATE. By default all PROCs/etc declarations are public. PUBLIC & PRIVATE must be on their own line, and affects all declarations after it.

PortablE's backwards compatibility mode (OPT AMIGAE) stops it from reporting errors about EXPORT (but it merely ignores it).


There is currently no "ShowModule" utility, mainly because all PortablE modules are source code (rather than .m object code) and so are human-readable in the first place.

Quote:
is it possible to make a private constructor so that I can use a factory method to create an iterator?

You can declare methods as PRIVATE in the same way that procedures/etc can be. Of course such methods are not accessible outside of the module, not even for parent classes.

PortablE also supports PROTECTED object *members*, but currently not *methods*. If that is a problem, then one possible work-around is have 'protected' members declared in a child class, but to cast that class to the parent class when returning it.

Posted on: 2011/8/20 11:30
ChrisH
--
Author of the PortablE programming language.
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


EXPORT in module?
#1
Home away from home
Home away from home


See User information
Hello,

I'm working on porting my hashtable routine to PortablE in the hopes that type-safety will make it easier to find the bugs. The first thing that the compiler told me when compiling my port is that the hash function and the umod (unsigned modulo replacement) do not recognize the EXPORT directive for module visibility. Is this a change in PortablE over AmigaE? Note that those two procedures are not methods.

The reason I'm asking is that if a show-module utility for PortablE exists, I'd like it to only list the EXPORTed procedures. Also, is it possible to make a private constructor so that I can use a factory method to create an iterator?

Thanks,

--Sam

Posted on: 2011/8/13 18:16
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4462
2 nikolaos
nikolaos
4206
3 magorium
magorium
4095
4 phoenixkonsole
phoenixkonsole
3942
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2810
7 mazze
mazze
2222
8 Kalamatee
Kalamatee
2212
9 clusteruk
clusteruk
2114
Powered by XOOPS © 2001-2025 The XOOPS Project