Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using HAC for teaching Ada to Beginners #2

Open
sanyaade-projects opened this issue Oct 12, 2020 · 3 comments
Open

Using HAC for teaching Ada to Beginners #2

sanyaade-projects opened this issue Oct 12, 2020 · 3 comments

Comments

@sanyaade-projects
Copy link

Hi Everybody,

Many thanks for making HAC, I found it very good and portable to give to my students.

What I will like to do is to use the Ada standard directives like with, package:, etc...

e.g. with Ada.Text_IO; use Ada_Text_IO; and so on....

My students are young learners (Age 15-18yr), new to Ada so it is important to teach the standard methods and programming fundamentals, etc...

HAC won't compile the code below:

with Ada.Text_IO;
procedure Greet is
begin
-- Print "Hello, World!" to the screen
Ada.Text_IO.Put_Line ("Hello, World!");
Ada.Text_IO.Put_Line("We love Hac Compiler for its compact size")
end Greet;

Is there are any way around doing this with HAC?

Many thanks!

Hear from you soon!

God blesses!!!

Best regards,
Sanyaade

@zertovitch
Copy link
Owner

zertovitch commented Oct 12, 2020

Hi Sanyaade,

Unfortunately the modularity (i.e. packages) is not yet implemented in HAC (0.074).
However, already now, you can compile programs written for HAC with a complete Ada compiler such as GNAT, thanks to the real package HAC_Pack. See hac_pack.ads, hac_pack.adb in the src directory.

Regards,
Gautier

@sanyaade-projects
Copy link
Author

@zertovitch :

Many thanks for getting back to me and for your quick reply.

I will look at the GNAT and those src files you mentioned and feedback to you.

Please add the packages feature on your list for the next release. Many thanks!
If there is a document or guide line on how to implement package or as a plug-in, then I would like to take that task up and to contribute doing that add-on stuff

Many thanks! Much appreciated!

God blesses!!!

Best regards,
Sanyaade

@zertovitch
Copy link
Owner

zertovitch commented Oct 17, 2020

It's already on the list (hac_work.xls, sheet: to-do). But, for instance, to get to Ada.Text_IO, we'd need to implement String's, which requires first unconstrained arrays, which is already not a piece of cake. And programmable exceptions. And child packages. Lots of work...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants