Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

PortablE

PortablE E language
63 posts | Last Activity on 10-06-2014 13:36 by amigamia
amigamia
amigamia 10-06-2014 13:36, 10 years ago
Re: New Version of PortablE?
Ahhh that's it! Thanks Magorium. What's the best editor with intellisense for E Language or PortablE?
M
magorium 10-06-2014 08:33, 10 years ago
Re: New Version of PortablE?
I wasn't able to find something solid called r7, but i managed to find [url=http://aros-exec.org/modules/newbb/viewtopic.php?post_id=87805#forumpost87805]this[/url] when r6 was active. So one could imagine that the specific statement was concerning r7 (but i'm guessing here). It seems to me that Chris made a lot improvements (based upon improvements made in responses to user specific questions). I hope things succeed.
amigamia
amigamia 10-06-2014 08:22, 10 years ago
Re: New Version of PortablE?
Hi Chris, When will a new version of PortablE be released? I recall a statement of a WIP version (Revision 7?) somewhere but I can't find it. Any news? Thanks!
serk118uk
serk118uk 15-03-2012 10:55, 12 years ago
Re: syntax highlighting
@magorium Thank you for the larger picture and will try to learn when i creat bit more free time of work/life/my ongoing projects...
Responded in syntax highlighting
M
magorium 05-03-2012 15:30, 12 years ago
Re: syntax highlighting
@serk118uk Good :-) Then i can tell that the fpGUI project is a GUI layer (for easyness call it a mui for pascal) for the freepascal compiler (a lot smaller then the LCL codebase) that can also be implemented in freepascal as LCL (in which case it's codebase becomes bigger). When not using as LCL (so in it's pure form), fpGUI has its own uidesigner and it's own editor (called maximus -> that was the picture i showed earlier). More about the project on it's home page ([url]http://fpgui.sourceforge.net/)[/url], a wikipedia article ([url]http://en.wikipedia.org/wiki/FpGUI[/url]) and the sourcecode on git ([url]https://github.com/graemeg/fpGUI[/url]). Current status for aros -> it shows fpGUI is just starting to be implemented for aros ;). ALB just started implementing it, but it already shows the gui. Not all functionality is implemented at the moment. That's what we (or rather ALB42) is working on. If you are a bit adventures, you could try (freepascal) for yourself if you want to. If you do try and need help because you get stuck or something then please ask. If you know your way around the fpc compiler a little then things are pretty easy to setup. Perhaps fpGUI's code can inspire to make something similar for E ? I honestly do not know if there are other widgetset-support available for portablE. I do not want to distract you from using E, it's perhaps just worth something to look at ? Regards,
Responded in syntax highlighting
serk118uk
serk118uk 04-03-2012 11:21, 12 years ago
Re: syntax highlighting
[quote][url=http://arosworld.org/forum/viewthread.php?thread_id=15&pid=95#post_95][b]magorium wrote:[/b][/url] [img]http://fpgui.sourceforge.net/images/full/ide_main_form.png[/img] Or did i completely missed the point of your question here ? reagrds,[/quote] no you have not matey......would be nice to have something like this for aros..
Responded in syntax highlighting
M
magorium 02-03-2012 15:39, 12 years ago
Re: syntax highlighting
Hi serk118uk, [quote]is it possible to program a text editor in PortableIE which has syntax coloring for gcc c/c++ than going the hard zune/mui way.[/quote] I know it probably isn't really your cup of tea but it could in general give an answer to your question _if_ it is possible at all. [img]http://fpgui.sourceforge.net/images/full/ide_main_form.png[/img] So if that should work in freepascal for aros then it most definitly would be possible to do something similar with PortablE. ;) Or did i completely missed the point of your question here ? reagrds,
Responded in syntax highlighting
serk118uk
serk118uk 01-03-2012 04:35, 12 years ago
Re: syntax highlighting
[quote][url=http://arosworld.org/forum/viewthread.php?thread_id=15&pid=90#post_90][b]cavemann wrote:[/b][/url] @serk I don't use syntax coloring. I find it distracting and sometimes switch it off, or reduce the number of colors. But most people seem to like it. Iirc the PortablE calls are made to be system independant, so I suppose a specialized text editor would not necessarily need to use Zune directly. I think there may be some examples that show the PortablE rapid design features. But instead of starting another editor, there are some alternatives: ShInKurO might be interested in adding syntax coloring to NoWinEd. Annotate already has syntax coloring. Perhaps the latest version can be ported to Aros. Simple Ed or Jano Ed code could be used as the base for an updated editor. The source is available. (Actually the source is available for all Aros editors, although I'm not sure about the licence conditions). Surely it would be more problematic to start a new editor from scratch (unless you want to use the PortablE editor on different platforms). Either way, a new or updated editor would be most welcome.[/quote] GoldEd was nice and stormC had one and user friendly and mos got one and as aros user we have no pro editors when you look back to os3 68k amigas and i like "Jano Ed code could be used as the base for an updated editor. The source is available"
Responded in syntax highlighting
C
cavemann 12-02-2012 15:00, 12 years ago
Re: syntax highlighting
@serk I don't use syntax coloring. I find it distracting and sometimes switch it off, or reduce the number of colors. But most people seem to like it. Iirc the PortablE calls are made to be system independant, so I suppose a specialized text editor would not necessarily need to use Zune directly. I think there may be some examples that show the PortablE rapid design features. But instead of starting another editor, there are some alternatives: ShInKurO might be interested in adding syntax coloring to NoWinEd. Annotate already has syntax coloring. Perhaps the latest version can be ported to Aros. Simple Ed or Jano Ed code could be used as the base for an updated editor. The source is available. (Actually the source is available for all Aros editors, although I'm not sure about the licence conditions). Surely it would be more problematic to start a new editor from scratch (unless you want to use the PortablE editor on different platforms). Either way, a new or updated editor would be most welcome.
Responded in syntax highlighting
S
SamuraiCrow 25-11-2011 19:47, 12 years ago
Re: bitset inventory example 2
Ok. Now notice the way that the description is no longer embedded in the item class? It is now accessed by the getdescription() method. But wait! The getdescription() method is EMPTY in the item class. This means that item is an abstract class. You can't use it by itself but you can use child classes of it. The textitem.e file has all of the stuff in it that allows us to define an item and still expect it to work. Let's look at textitem.e for a while. It is a module which allows it to be reused. The textitem class definition is of the item class. This is called inheritance in object-oriented terminology. The getdescription() method is defined here using a print statement that prints the description. This is called "overloading" the method definition. Lastly, the constructor of textitem has to call the makeitem constructor as well as initialize the description string so it uses the SUPER keyword to indicate that the computer is to call the parent class's version of the constructor. This is called "chaining" the constructors. What inheritance means is that everything that can be done to an item can be done to a textitem since it is a child class. This also means that the item class fields are present in the child class even though we didn't have to copy and paste them. This saves us typing and also saves memory since we can have several kinds of items with different ways to describe themselves. The tradeoff in such an arrangement is that the code will execute more slowly since methods have to look up a pointer in a table to find which function they are supposed to be calling while functions that are not object-oriented methods can be called directly. There have been changes here and there in the itembasetest.e file from the itemtest.e file from the previous lesson. The main difference is that everything that used to be an item is now a textitem and every NEW call to the constructor makeitem() now calls maketextitem() instead. Since the description string is not expected to have a newline character at the end, I also made adjustments to the usage of every call to the getdescription() method. Did you notice that I had to call both the textitem and inventorybase modules from within the inventorybasetest.e file? This is because I call the inventory class objects from within the inventorybasetest program directly. Otherwise I could have let textitem.e chain call the inventorybase.e module since the item class is needed by the testitem child class. Feel free to ask any questions.
S
SamuraiCrow 25-11-2011 15:34, 12 years ago
Re: bitset inventory example 2
In our last lesson, we showed how to do a simple 64 item bitset. Now we're going to make it more flexible and object-oriented. I'll discuss the changes I've made in a later post. Here are the new codes: inventorybase.e [code]OPT MODULE CLASS item itemnum:INT pad1:INT ENDCLASS DEF nextitem:INT,itemlist[SIZEOF BIGVALUE*8]:ARRAY OF PTR TO item PROC makeitem() NEW OF item self.itemnum:=nextitem itemlist[nextitem]:=self ++nextitem IF nextitem>(SIZEOF BIGVALUE*8) THEN Raise("ARG") ENDPROC PROC getmask() OF item RETURNS mask:BIGVALUE IS 1 SHL self.itemnum PROC getdescription() OF item IS EMPTY CLASS inventory mask:BIGVALUE ENDCLASS PROC makeinventory() NEW OF inventory self.mask:=0 ENDPROC PROC additem(myitem:PTR TO item) OF inventory self.mask:=self.mask OR myitem.getmask() ENDPROC PROC removeitem(youritem:PTR TO item) OF inventory self.mask:=self.mask AND NOT youritem.getmask() ENDPROC PROC hasitem(myitem:PTR TO item) OF inventory RETURNS ret:BOOL ret:= (self.mask AND myitem.getmask()=myitem.getmask()) ENDPROC PROC hasany(items:PTR TO inventory) OF inventory RETURNS ret:BOOL ret:=(self.mask AND items.mask <> 0) ENDPROC PROC hasall(items:PTR TO inventory) OF inventory RETURNS ret:BOOL ret:=(self.mask AND items.mask = items.mask) ENDPROC PROC getitem(source:PTR TO inventory, theitem:PTR TO item) OF inventory RETURNS ret:BOOL ret:=FALSE IF source.hasitem(theitem) source.removeitem(theitem) self.additem(theitem) ret:=TRUE ENDIF ENDPROC PROC giveitem(destination:PTR TO inventory, theitem:PTR TO item) OF inventory RETURNS ret:BOOL ret:=destination.getitem(self,theitem) ENDPROC PROC useall(items:PTR TO inventory) OF inventory RETURNS ret:BOOL ret:=FALSE IF self.hasall(items) self.mask:=self.mask AND NOT items.mask ret:=TRUE ENDIF ENDPROC PROC list() OF inventory DEF count:INT,current:PTR TO item FOR count:=0 TO nextitem-1 current:=itemlist[count] IF self.hasitem(current) current.getdescription() Print('\n') ENDIF ENDFOR ENDPROC [/code] textitem.e [code]OPT MODULE MODULE '*inventorybase' CLASS textitem OF item description:STRING ENDCLASS PROC getdescription() OF textitem IS Print('\s',self.description) PROC maketextitem(describe:STRING) NEW OF textitem SUPER self.makeitem() self.description:=describe ENDPROC [/code] inventorybasetest.e [code] MODULE '*textitem', '*inventorybase' DEF lamp:PTR TO textitem, torch:PTR TO textitem, bag:PTR TO textitem, room:PTR TO inventory, mystuff:PTR TO inventory, lights:PTR TO inventory, allstuff:PTR TO inventory PROC getit(what:PTR TO textitem) IF mystuff.getitem(room,what) Print('You\'ve picked up ') what.getdescription() ELSE Print('You aleady have ') what.getdescription() ENDIF Print('.\n') ENDPROC PROC main() DEF in[4]:STRING NEW lamp.maketextitem(NEW 'a lamp') NEW torch.maketextitem(NEW 'a torch') NEW bag.maketextitem(NEW 'a bag') NEW room.makeinventory() NEW mystuff.makeinventory() NEW lights.makeinventory() NEW allstuff.makeinventory() room.additem(lamp) room.additem(torch) room.additem(bag) lights.additem(lamp) lights.additem(torch) allstuff.additem(lamp) allstuff.additem(torch) allstuff.additem(bag) REPEAT IF mystuff.hasany(lights) Print('You are in a room with no doors and no windows.\n') Print('You see:\n') room.list() ELSE Print('It\'s dark. You are likely to be eaten by a grue.\n') ENDIF Print('\nWhat do you grab?\n') PrintFlush() ReadStr(stdin,in) SELECT in[0] CASE "l"; getit(lamp) CASE "t"; getit(torch) CASE "b"; getit(bag) DEFAULT; Print('I don\'t see it here.\n') ENDSELECT UNTIL mystuff.hasall(allstuff) Print('You have everything! You win!\n') PrintFlush() FINALLY PrintException() ENDPROC [/code]
S
SamuraiCrow 07-11-2011 17:03, 12 years ago
Re: bitset inventory example
Thanks for the tip about BIGVALUE! Here's the latest version. [code]OPT MODULE CLASS item itemnum:INT pad1:INT description:ARRAY OF CHAR ENDCLASS DEF nextitem:INT,itemlist[SIZEOF BIGVALUE*8]:ARRAY OF PTR TO item PROC makeitem(describe:ARRAY OF CHAR) NEW OF item self.itemnum:=nextitem itemlist[nextitem]:=self ++nextitem IF nextitem>(SIZEOF BIGVALUE*8) THEN Raise("ARG") self.description:=describe ENDPROC PROC getmask() OF item RETURNS mask:BIGVALUE IS 1 SHL self.itemnum PROC getdescription() OF item IS self.description CLASS inventory mask:BIGVALUE ENDCLASS PROC makeinventory() NEW OF inventory self.mask:=0 ENDPROC PROC additem(myitem:PTR TO item) OF inventory self.mask:=self.mask OR myitem.getmask() ENDPROC PROC removeitem(youritem:PTR TO item) OF inventory self.mask:=self.mask AND NOT youritem.getmask() ENDPROC PROC hasitem(myitem:PTR TO item) OF inventory RETURNS ret:BOOL ret:= (self.mask AND myitem.getmask()=myitem.getmask()) ENDPROC PROC hasany(items:PTR TO inventory) OF inventory RETURNS ret:BOOL ret:=(self.mask AND items.mask <> 0) ENDPROC PROC hasall(items:PTR TO inventory) OF inventory RETURNS ret:BOOL ret:=(self.mask AND items.mask = items.mask) ENDPROC PROC getitem(source:PTR TO inventory, theitem:PTR TO item) OF inventory RETURNS ret:BOOL ret:=FALSE IF source.hasitem(theitem) source.removeitem(theitem) self.additem(theitem) ret:=TRUE ENDIF ENDPROC PROC giveitem(destination:PTR TO inventory, theitem:PTR TO item) OF inventory RETURNS ret:BOOL ret:=destination.getitem(self,theitem) ENDPROC PROC useall(items:PTR TO inventory) OF inventory RETURNS ret:BOOL ret:=FALSE IF self.hasall(items) self.mask:=self.mask AND NOT items.mask ret:=TRUE ENDIF ENDPROC PROC list() OF inventory DEF count:INT,current:PTR TO item FOR count:=0 TO nextitem-1 current:=itemlist[count] IF self.hasitem(current) Print('\s\n',current.getdescription()) ENDIF ENDFOR ENDPROC [/code] Notice that I switched from using assumed constants for the size of the BIGVALUE and used the SIZEOF operator to find the size in bytes? That should make the code easier to read and easier to port! :)
ChrisH
ChrisH 04-11-2011 05:10, 12 years ago
Re: bitset inventory example
@SamuraiCrow PortablE already supports the equivalent of "long long" (i.e. 64-bits). It is called BIGVALUE. (Although you can only write 32-bit numbers directly in the code.) P.S. Cast cost programmer time & in general should be avoided.
S
SamuraiCrow 03-11-2011 22:38, 12 years ago
Re: bitset inventory example
I'm looking forward to the equivalent of long long in PortablE. :) I know that C99 supports it. Besides, casts cost nothing when it's run through GCC.
ChrisH
ChrisH 03-11-2011 17:26, 12 years ago
Re: bitset inventory example
I haven't had time to closely examine the code, but... [quote][code] PROC getmask() OF item RETURNS mask:LONG IS 1 SHL self.itemnum [/code] [code] CLASS inventory mask:LONG ENDCLASS [/code][/quote] Just a little bit of advice: It almost never makes sense to use the :LONG type, since it causes unnecessary casts without any benefit. Better to use no type at all, which means it automatically defaults to :VALUE . This avoids unnecessary casts, but is the same size (at least until PortablE runs on a 64-bit native OS+CPU).
S
SamuraiCrow 01-11-2011 15:03, 12 years ago
Re: bitset inventory example
For those of you who have downloaded the source, I'm afraid you'll have to download it again. ChrisH was kind enough to point out a mistake in my code regarding QUAD variables. I had to replace them with LONGs instead and correct the size of the bitset.
ChrisH
ChrisH 01-11-2011 13:12, 12 years ago
Re: Developer environment
[quote]So that would probably also mean that i wrongly assume portableE is written in E ?[/quote] PortablE is written in PortablE :-) although originally it was written in AmigaE (to "boot strap" itself).
Responded in Developer environment
S
SamuraiCrow 31-10-2011 12:31, 12 years ago
Re: bitset inventory example
Ok, class, now let's look through each line of the inventory.e module. [code] OPT MODULE [/code] This tells PortablE that this will be a module rather than a program. A module is similar to a linker library on other languages. [code] CLASS item itemnum:INT pad1:INT description:ARRAY OF CHAR ENDCLASS [/code] The class definition tells what data items are stored in a single item record. Notice that pad1 is not used later on. It is only there because the array won't perform quickly if it isn't aligned to a 4-byte boundary. An INT in PortablE is only 2 bytes long. [code] DEF nextitem:INT,itemlist[32]:ARRAY OF PTR TO item [/code] Here are some global variables. The nextitem variable will be used to hold the number of items available defined. The itemlist variable allocates space to store a table of pointers to the item definitions. The reason it's only 32 items in length is that that is the number of bits in a LONG variable. Since this is a bitset, each bit will represent a slot in the inventory. [code] PROC makeitem(describe:ARRAY OF CHAR) NEW OF item self.itemnum:=nextitem itemlist[nextitem]:=self ++nextitem IF nextitem>31 THEN Raise("ARG") self.description:=describe ENDPROC [/code] This is a procedure. It defines an action the computer can take to do a particular purpose. Since it says NEW OF item at the beginning it defines when it can be used. The NEW tells that it is used with the NEW operator so this is considered to be a constructor. The OF item tells that this is actually a method associated with the item class. A constructor tells the computer what needs to be done to set the initial values for the item class. [code] PROC getmask() OF item RETURNS mask:LONG IS 1 SHL self.itemnum [/code] Here is another method of the item class. It is not a constructor because the NEW is not listed before the OF item. It tells how to define a mask of an item. [code] PROC getdescription() OF item IS self.description [/code] This method is called a "getter" method. It just gets some information from the item class and returns it. The reason for having a getter method is that it allows a piece of information to be hidden in the class using the PRIVATE directive. Since there is no PRIVATE directive this is just used for future necessity rather than real present need. [code] CLASS inventory mask:LONG ENDCLASS [/code] Here's another class definition. It holds only one item: the mask. It is not optional to have this as a class though, because we will be defining many methods of it. [code] PROC makeinventory() NEW OF inventory self.mask:=0 ENDPROC [/code] Here is the constructor. All it does is clear the mask. It is necessary to do this to a class because the operating system might not clear the memory a class is declared in. If it does, we wouldn't have needed a constructor at all in this case. Another thing to note: Since there is only one command inside the procedure, we could have used the IS command to make it all one line of code. It's just for clarity that I wrote it out the long way. [code] PROC additem(myitem:PTR TO item) OF inventory self.mask:=self.mask OR myitem.getmask() ENDPROC PROC removeitem(youritem:PTR TO item) OF inventory self.mask:=self.mask AND NOT youritem.getmask() ENDPROC [/code] These two methods mask on or off a single bit of memory using AND, OR and NOT operators. These are packing boolean values. These are the fundamental operators of a bitset. [code] PROC hasitem(myitem:PTR TO item) OF inventory RETURNS ret:BOOL ret:= (self.mask AND myitem.getmask()=myitem.getmask()) ENDPROC PROC hasany(items:PTR TO inventory) OF inventory RETURNS ret:BOOL ret:=(self.mask AND items.mask <> 0) ENDPROC PROC hasall(items:PTR TO inventory) OF inventory RETURNS ret:BOOL ret:=(self.mask AND items.mask = items.mask) ENDPROC [/code] These three methods test a bit or bits to see if the masks of an item or another inventory can compare to the masks in the current item. [code] PROC getitem(source:PTR TO inventory, theitem:PTR TO item) OF inventory RETURNS ret:BOOL ret:=FALSE IF source.hasitem(theitem) source.removeitem(theitem) self.additem(theitem) ret:=TRUE ENDIF ENDPROC [/code] This method uses 3 other methods to do a bit transfer. The hasitem method checks if the item is available, and the other two clear and set the appropriate bitmask. [code] PROC giveitem(destination:PTR TO inventory, theitem:PTR TO item) OF inventory RETURNS ret:BOOL ret:=destination.getitem(self,theitem) ENDPROC [/code] This method does the reverse of the getitem method. Notice how it just uses the getitem method with the source and destination reversed. [code] PROC useall(items:PTR TO inventory) OF inventory RETURNS ret:BOOL ret:=FALSE IF self.hasall(items) self.mask:=self.mask AND NOT items.mask ret:=TRUE ENDIF ENDPROC [/code] This method allows items to be consumed in their use. Like the previous two, it returns a boolean value (true or false) that tells if the method succeeded. [code] PROC list() OF inventory DEF count:INT,current:PTR TO item FOR count:=0 TO nextitem-1 current:=itemlist[count] IF self.hasitem(current) Print('\s\n',current.getdescription()) ENDIF ENDFOR ENDPROC [/code] And this last method is a bit more complicated. It lists out each item in an inventory by counting through all the used items, fetching the item from the table, checking if it is used in this inventory, and printing its description if it is.
S
SamuraiCrow 30-10-2011 17:34, 12 years ago
Re: bitset inventory example
Ok! Here is the long awaited inventory example! Call this file inventory.e [code] OPT MODULE CLASS item itemnum:INT pad1:INT description:ARRAY OF CHAR ENDCLASS DEF nextitem:INT,itemlist[32]:ARRAY OF PTR TO item PROC makeitem(describe:ARRAY OF CHAR) NEW OF item self.itemnum:=nextitem itemlist[nextitem]:=self ++nextitem IF nextitem>31 THEN Raise("ARG") self.description:=describe ENDPROC PROC getmask() OF item RETURNS mask:LONG IS 1 SHL self.itemnum PROC getdescription() OF item IS self.description CLASS inventory mask:LONG ENDCLASS PROC makeinventory() NEW OF inventory self.mask:=0 ENDPROC PROC additem(myitem:PTR TO item) OF inventory self.mask:=self.mask OR myitem.getmask() ENDPROC PROC removeitem(youritem:PTR TO item) OF inventory self.mask:=self.mask AND NOT youritem.getmask() ENDPROC PROC hasitem(myitem:PTR TO item) OF inventory RETURNS ret:BOOL ret:= (self.mask AND myitem.getmask()=myitem.getmask()) ENDPROC PROC hasany(items:PTR TO inventory) OF inventory RETURNS ret:BOOL ret:=(self.mask AND items.mask <> 0) ENDPROC PROC hasall(items:PTR TO inventory) OF inventory RETURNS ret:BOOL ret:=(self.mask AND items.mask = items.mask) ENDPROC PROC getitem(source:PTR TO inventory, theitem:PTR TO item) OF inventory RETURNS ret:BOOL ret:=FALSE IF source.hasitem(theitem) source.removeitem(theitem) self.additem(theitem) ret:=TRUE ENDIF ENDPROC PROC giveitem(destination:PTR TO inventory, theitem:PTR TO item) OF inventory RETURNS ret:BOOL ret:=destination.getitem(self,theitem) ENDPROC PROC useall(items:PTR TO inventory) OF inventory RETURNS ret:BOOL ret:=FALSE IF self.hasall(items) self.mask:=self.mask AND NOT items.mask ret:=TRUE ENDIF ENDPROC PROC list() OF inventory DEF count:INT,current:PTR TO item FOR count:=0 TO nextitem-1 current:=itemlist[count] IF self.hasitem(current) Print('\s\n',current.getdescription()) ENDIF ENDFOR ENDPROC [/code] And here's the code to test it out: [code] MODULE '*inventory' DEF lamp:PTR TO item, torch:PTR TO item, bag:PTR TO item, room:PTR TO inventory, mystuff:PTR TO inventory, lights:PTR TO inventory, allstuff:PTR TO inventory PROC getit(what:PTR TO item) IF mystuff.getitem(room,what) Print('You\'ve picked up \s.\n', what.getdescription()) ELSE Print('You aleady have \s.\n', what.getdescription()) ENDIF ENDPROC PROC main() DEF in[4]:STRING NEW lamp.makeitem('a lamp') NEW torch.makeitem('a torch') NEW bag.makeitem('a bag') NEW room.makeinventory() NEW mystuff.makeinventory() NEW lights.makeinventory() NEW allstuff.makeinventory() room.additem(lamp) room.additem(torch) room.additem(bag) lights.additem(lamp) lights.additem(torch) allstuff.additem(lamp) allstuff.additem(torch) allstuff.additem(bag) REPEAT IF mystuff.hasany(lights) Print('You are in a room with no doors and no windows.\n') Print('You see:\n') room.list() ELSE Print('It\'s dark. You are likely to be eaten by a grue.\n') ENDIF Print('\nWhat do you grab?\n') PrintFlush() ReadStr(stdin,in) SELECT in[0] CASE "l"; getit(lamp) CASE "t"; getit(torch) CASE "b"; getit(bag) DEFAULT; Print('I don\'t see it here.\n') ENDSELECT UNTIL mystuff.hasall(allstuff) Print('You have everything! You win!\n') PrintFlush() FINALLY PrintException() ENDPROC [/code] I'll break this down for you in the next week or so.
S
SamuraiCrow 26-10-2011 11:56, 12 years ago
Re: Developer environment
Thinking back, I think that ChrisH already fixed PortablE for AROS so that the errors I ran into won't be there in the final release 6 version. He just hasn't come out with the final release yet. Recently I remember him cleaning up bugs on AROS and MorphOS both. I hope he finds time to finish up the release so I can continue the tutorial. @Magorium I don't know if the server services from VirtualBox would be more viable. There is an option to do something like that in the Icaros installer though, IIRC.
Responded in Developer environment
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
Moderator: Administrator

Filter by Tags

Popular Threads This Week

AROS One x86 Work In Progressby AMIGASYSTEM 138 posts
Tiny Aros DistrĂ²by Amiwell79 90 posts
Aros Software Promotionby Amiwell79 69 posts
AROS Archives - clean upby AMIGASYSTEM 59 posts
ADoom3 benchmarkby retrofaza 31 posts
Development Planby deadwood 27 posts
Sign In
Not a member yet? Click here to register.
Forgot Password?
Users Online Now
Guests Online 2
Members Online 0

Total Members: 224
Newest Member: Zhule
Member Polls
Should AROSWorld continue with AROS-Exec files (SMF based)?
Yes44 %
44% [12 Votes]
No26 %
26% [7 Votes]
Not sure30 %
30% [8 Votes]