Language E

AMIGASYSTEM · 1329

AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
on: March 27, 2022, 01:21:24 AM
I've compiled in 68k the source in "E" of an application called "UndElEtE", I've compiled four executables two in english and two in italian, respectively for PFS and SFS filesytems.

After that I wanted to compile the source also on AROS x86, where for this purpose I installed "PortablE" for AROS x86.

Everything seemed to go well but in the end I received the message attached, can you solve it? provato di tutto anche a rinominare internamente la reqtools.library alla versione 38, of course as you all know I am not a developer and I don't know the E language


Error Message:

ERROR: unknown procedure
LINE 13:     IF reqtoolsbase:=OpenLibrary('reqtools.library',38)
« Last Edit: March 27, 2022, 01:33:56 AM by AMIGASYSTEM »



magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #1 on: March 27, 2022, 05:39:13 PM
Just for the record:


That program copies (selected from requester) files from .deldir to T:


It literally executes the cli command copy with some parameters, one of which are the selected filenames and runs that in a loop, e.g. nothing that you can't do yourself manually.


With regards to the E-specific error, i have to guess that it is not including the module exec, and fail's during build because the transpiler is unable to locate the function OpenLibrary.


AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #2 on: March 28, 2022, 03:00:16 AM
Just for the record:

That program copies (selected from requester) files from .deldir to T:


Si per PFS, .recycled a T: per SFS

Quote
It literally executes the cli command copy with some parameters, one of which are the selected filenames and runs that in a loop, e.g. nothing that you can't do yourself manually.

The manual version is the one I created with the script that opens .deldir and .recycled on Dopus4 as shown in the attached video:

https://youtu.be/jXssBKLm_To

Quote
With regards to the E-specific error, i have to guess that it is not including the module exec, and fail's during build because the transpiler is unable to locate the function OpenLibrary.

If you're referring to a module called exec, it's actually not present in the "PEmodule" folder, but it's not present in the "Modules" folder on OS3 either, where compilations worked perfectly.

From what I've understood Portable doesn't compile the E source, but converts it into a c++ source.

I also tried to compile some examples included in the Portable package and everything worked perfectly, even if I couldn't compile the c++ source with GCC/c++.
« Last Edit: March 28, 2022, 03:03:24 AM by AMIGASYSTEM »



new123

  • Newbie
  • *
    • Posts: 29
    • Karma: +38/-0
Reply #3 on: March 28, 2022, 12:32:40 PM
Error Message:

ERROR: unknown procedure
LINE 13:     IF reqtoolsbase:=OpenLibrary('reqtools.library',38)

Add 'exec', 'dos' and 'utility/tagitem' in "MODULE ..." line.

Then, all functions from reqtools.library (like RtFileRequestA(...), also SystemTagList(...)) should have [NIL]:tagitem instead of just NIL. Some functions already have non-empty taglist parameter, so you must modify them too, for example: RtChangeReqAttrA(filereq,[RTFI_DIR,volume,0]:tagitem)

Finally, replace all WriteF to Print.

Good luck! 8)



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #4 on: March 28, 2022, 04:17:31 PM
I will try. eventually I will ask for your help again, thanks for helping me !

EDIT:

Made corrections and the compilation continued, then stopped on this error, I attach source if you kindly fix it, thanks

Code: [Select]
1.RAM Disk:> portable undelete.e
Target OS=AROS, language=CPP.
Loading module 'RAM Disk:/Undelete'.
Parsing module 'RAM Disk:/Undelete'.                                 

ERROR: parameter of incorrect type
LINE 16:    IF RtFileRequestA(filereq,filename,'Please choose an AFS-Partition',[RTFI_VOLUMEREQUEST,VREQF_NOASSIGNS,0]
                   )
 Hint: parameter has type ARRAY OF tagitem, expression has type fixed-size ILIST.
1.RAM Disk:>

« Last Edit: March 28, 2022, 05:34:26 PM by AMIGASYSTEM »



new123

  • Newbie
  • *
    • Posts: 29
    • Karma: +38/-0
Reply #5 on: March 29, 2022, 02:28:17 PM
Just add :tagitem after parameter list enclosed in square brackets.

Code: [Select]
RtFileRequestA(filereq,filename,'Please choose an AFS-Partition',[RTFI_VOLUMEREQUEST,VREQF_NOASSIGNS,0]:tagitem)

Did it compile now? :)



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #6 on: March 29, 2022, 03:11:04 PM
Still errors, I probably got something wrong, if you can correct maybe I can fill it in, thanks

Code: [Select]
ERROR: expected "," or ")"
LINE 14:   IF filereq:=RtAllocRequestA(RT_FILEREQ,[NIL]:tagitem    Print('\s\n',ver+6)


new123

  • Newbie
  • *
    • Posts: 29
    • Karma: +38/-0
Reply #7 on: March 29, 2022, 03:38:45 PM
Pay attention, all brackets must match. That's why you got this error message:

Code: [Select]
ERROR: expected "," or ")"

You probably accidently deleted closing curly bracket after adding :tagitem.



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #8 on: March 30, 2022, 02:53:06 AM
Perfect, I've redone all the fixes you suggested and two other errors, and finally I was able to compile Undele PFS/SFS in both English and Italian, see screenshot.

Thank you very much for encouraging me to do it myself, doing these things at 68 is a bit complicated when you have no programming knowledge, thanks again !

Although it's ok, only flaw, as you can see from the screenshot, the x86 version has a narrower request file and you can't read all the text:

"Please choose an PFS Part", the word Partition is truncated, can you do something, thanks


« Last Edit: March 31, 2022, 02:00:58 AM by AMIGASYSTEM »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #9 on: March 31, 2022, 02:07:05 AM
I solved it by shortening the text, the problem however was only on AROS, on Amiga OS the long head problem didn't exist !

I would like to make another request, is it possible to hide the popup that shows the version, so that it is no longer shown ?

Code: [Select]

PROC main()
    ver:='$VER: Undelete SFS v1.0 (26.03.22) ......


I can solve it by using a script with >NIL: but I would prefer to edit the source, thanks
« Last Edit: March 31, 2022, 02:21:12 AM by AMIGASYSTEM »



new123

  • Newbie
  • *
    • Posts: 29
    • Karma: +38/-0
Reply #10 on: March 31, 2022, 11:14:59 AM
Thank you very much for encouraging me to do it myself, doing these things at 68 is a bit complicated when you have no programming knowledge, thanks again !

Congratulations! ;D Programming is not that hard as you think. AmigaE has soft learning curve, it's good for beginners.

I solved it by shortening the text, the problem however was only on AROS, on Amiga OS the long head problem didn't exist !

Are you sure? On my AmigaOS 3.1, text is truncated because requester has fixed width with cannot be changed.

Quote
I would like to make another request, is it possible to hide the popup that shows the version, so that it is no longer shown ?

Comment out this line:

Code: [Select]
Print('\s\n',ver+6)
E language has two type of comments:

Code: [Select]
-> Print('\s\n',ver+6)
Code: [Select]
/* Print('\s\n',ver+6) */



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #11 on: March 31, 2022, 12:02:56 PM

Are you sure? On my AmigaOS 3.1, text is truncated because requester has fixed width with cannot be changed.

Yes, had a tighter Font  :D

Quote
Comment out this line:

I had already discovered the two methods to comment, I had even tried to use them, only I was wrong where to put them  ;D
« Last Edit: March 31, 2022, 12:10:10 PM by AMIGASYSTEM »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #12 on: April 01, 2022, 02:48:26 PM
Tested Undelete PFS/SFS OS3 version on MOS with success !!!