Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: trekiej on March 08, 2015, 07:09:08 PM
-
Hello.
Are there any Pascal programmers here?
If so, could you tell me the pros and cons of this language?
Thanks.
I need the moderator to delete the other Pascal User thread.
Thanks.
-
Hello.
Are there any Pascal programmers here?
If so, could you tell me the pros and cons of this language?
Thanks.
I need the moderator to delete the other Pascal User thread.
Thanks.
I used the PCQ compiler on the Amiga for quite some time and did some Pascal here and then (also see Gfx4PCQ, on Aminet, which is a nice graphic support library for PCQ). Well, Pascal was designed as a teaching language, allowing a single-pass compiler, that grew larger and more successful than its inventor originally intended (Wirth). Interestingly, his languages that tried to connect to this success and tried to provide functions for more professional programming were much less successful (Modula, Oberon). The good part is: It is a very clean, very strict, and very static language. In a sense, it is a very "German" language (sorry, Wirth is swiss, but I guess you get the idea), compared to the very pragmatic "American" language "C". If something is against the Pascal design, you cannot do it in Pascal. If something is against the C design, there is always a way to do what you want, even though it looks dirty and becomes a mess. It's much easier to create a mess in C than it is in Pascal, but it's much easier to get something done in C "quick and dirty" compared to Pascal. It is, in its design, a bit outdated for today's requirements, some of which were addressed by later language extensions. For example, the original Pascal had no "include" support (TurboPascal added this, and it is a very standard extension), had no String support (only static "Array of Character", though String is a very popular extension offered by many if not all implementations) and no modulo support, and no object orientation (Delphi added this). It is a nice tool for learning structured programming, but probably run out of fashion as it lacks some important modern features. Object orientation is closer to state of the art today, and this is why today python or java is tought instead. Nevertheless, Pascal was a milestone in language design.
-
Thanks, that was real good reply.
I am not for sure why I am interested in this language.
I did buy Turbo Pascal for dos from a community college a long time ago for a good price.
I wish I knew where to take this.
-
Hello.
Are there any Pascal programmers here?
If so, could you tell me the pros and cons of this language?
Thanks.
I need the moderator to delete the other Pascal User thread.
Thanks.
I took Pascal in college many moons ago and they used Turbo Pascal on the IBM compatible.
If you are a person who loses their train of thought, it might not be for you. The reason why is that you have to first declare your variables before you use them. And you have to know what kind of variable it is so if you change your variable in the course of programming from integer to string, you have to change your variable where you declared them which means you have to leave where you are in the program (losing your spot in line and finding it again) and cursor up to the top of the program. Remember, it is easy to get lost in a long program because there are no line numbers... And I spent some time getting lost in a three page program with no line numbers.
There are no line numbers. You have to practice writing loops. You have to get away from writing spaghetti code with Gosub and Return.
There is a command that has to do with Functions and it took a book to help me learn it because the teacher was bad at explaining it.
Turbo Pascal also had a bug or two where I had to tell the program to end twice because it didn't count the first end.
I wasted a few minutes compiling my program and figuring out the bugs in my code.
I'm not sure why they taught me to use it in college because no one uses it.
-
Have you looked into PureBasic for the Amiga? It is a follow up to TrueBasic and free.
-
I was looking at FreeBasic, but there is no Amiga or Aros version.
I have seen Pure Basic and would like to buy a license and also use the free one.
I think Hollywood or Amos is ideal but still want to research this more.
-
You can no longer buy a license for PureBasic, they made it free
-
Begin Chuckle
79 euros does not look to free to me. It's PureBasic not FreeBasic.
End Chuckle
-
I see a ban in my future.
:D
https://www.youtube.com/watch?v=lULXvuuy7W8
[youtube]lULXvuuy7W8[/youtube]
-
Begin Chuckle
79 euros does not look to free to me. It's PureBasic not FreeBasic.
End Chuckle
Well when I read their web site, it says 79 EUR if you want all four (4) versions (Amiga, Linux Windows and MacOS X), but if you just want the Amiga version 4.00 from http://www.purebasic.com/download.php I'm pretty sure that the text copied below says the "full version" is OpenSource and only the documentation runs all the way up to 2.90 EUR for the German catalog which I don't need, the English documentation is "free;" while that may seem like 79 EUR to you, it is near to free as Open Source gets. But you know how people lie on the internet, they could just be "pulling my leg."
AmigaOS
Download the full version of PureBasic 4.00 (OpenSource):
(http://www.purebasic.com/images/fleche.gif) (http://www.purebasic.com/download/PureBasic.lzx) PureBasic 4.00.lzx (http://www.purebasic.com/download/PureBasic.lzx)
Catalog files availables (Including documentation):
(http://www.purebasic.com/images/fleche.gif) (http://www.purebasic.com/download/French.lzx) French catalog for purebasic 1.50 (http://www.purebasic.com/download/French.lzx)
(http://www.purebasic.com/images/fleche.gif) (http://www.purebasic.com/download/Deutsch.lzx) German catalog for purebasic 2.90 (http://www.purebasic.com/download/Deutsch.lzx)
(http://www.purebasic.com/images/fleche.gif) (http://www.purebasic.com/download/Russian.lzx) Russian catalog for purebasic 1.50 (http://www.purebasic.com/download/Russian.lzx)
-
Oh, since I am a registered user (from years ago when I paid 24 EUR for the Amiga 3.2 version), here is what one can download:
(http://www.amiga.org/forums/picture.php?albumid=171&pictureid=1256)(http://http://www.amiga.org/forums/album.php?albumid=171&pictureid=1255)
-
@trekiej and @thread:
Free Pascal Compiler exists for MorphOS, AROS and Amiga/68k. It's open source and free. The classic Amiga version supports the 68020, with optional 68881 FPU (or using a software float library). 68000 support is experimental. It's possible to use most platform-independent high level Pascal language and runtime library elements on Amiga, like lists, hashtables, reference counted strings, and much more. There's also support for a number of (https://github.com/graemeg/freepascal/tree/master/packages/amunits/src/otherlibs) Amiga .libraries directly (https://github.com/graemeg/freepascal/tree/master/packages/amunits/src/coreunits). (It's trivial to convert a C header to a Pascal one anytime, to add more.)
Beside the command line compiler, the Free Pascal IDE is working on all supported platforms, including classic Amiga (http://charlie.amigaspirit.hu/screenshots/a2000/A2000-FPC-IDE-Compile1st.png). On MorphOS, the included programmer's editor Scribble includes Pascal syntax highlighting support out-of-box. The FPC AROS support is slightly more advanced and includes fpGUI and LCL (Lazarus Component Library) support as well, thanks to the work of Marcus 'Alb42' Sackrow. It's also easy to use a cross-compiler hosted on Mac OS X, Linux or Windows, targeting the Amiga-like systems.
The upcoming Free Pascal 3.0 stable release will provide official support for the aforementioned Amiga(-like) platforms as well. Meanwhile, experimental nightly SVN builds are available for both 3.0 branch (beta) and 3.1 branch (development/experimental) too on Alb42's site (http://home.alb42.de/fpcbin/).
-
I learned programming in Turbo Pascal in the 90s, and for the past 6 months, I have been using Delphi and Free Pascal through Lazarus.
Coming from php, I like Pascal a lot, the strict nature of the language makes it very easy to program, read other peoples code and likewise, have other people read your code.
Free Pascal works really well in WindowsCE environments, which is what I am currently working on (RFID Scanner).
Lazarus is supposed to be a write once compile for many OS's, but it still lacks the proper support for more obscure OS's like amiga, morph, BeOS and so on, though Lazarus comes prepared for the lot, includen CPU varianst, like x86, arm, 68k, ppc, mips and a few others.
Pointers are so much easier in pascal than in C.
OOP in objfpc is also very easy to use, though not as flexible as other OOP languages.
-
Thanks to everyone that posted.
I will keep on working with this.
-
I used the PCQ compiler on the Amiga for quite some time and did some Pascal here and then (also see Gfx4PCQ, on Aminet, which is a nice graphic support library for PCQ). Well, Pascal was designed as a teaching language, allowing a single-pass compiler, that grew larger and more successful than its inventor originally intended (Wirth). Interestingly, his languages that tried to connect to this success and tried to provide functions for more professional programming were much less successful (Modula, Oberon). The good part is: It is a very clean, very strict, and very static language. In a sense, it is a very "German" language (sorry, Wirth is swiss, but I guess you get the idea), compared to the very pragmatic "American" language "C". If something is against the Pascal design, you cannot do it in Pascal. If something is against the C design, there is always a way to do what you want, even though it looks dirty and becomes a mess. It's much easier to create a mess in C than it is in Pascal, but it's much easier to get something done in C "quick and dirty" compared to Pascal. It is, in its design, a bit outdated for today's requirements, some of which were addressed by later language extensions. For example, the original Pascal had no "include" support (TurboPascal added this, and it is a very standard extension), had no String support (only static "Array of Character", though String is a very popular extension offered by many if not all implementations) and no modulo support, and no object orientation (Delphi added this). It is a nice tool for learning structured programming, but probably run out of fashion as it lacks some important modern features. Object orientation is closer to state of the art today, and this is why today python or java is tought instead. Nevertheless, Pascal was a milestone in language design.
Turbo Pascal 7 added object, not Delphi. Delphi came later.
-
What would be nice if that Pascal programmers converts these tools to Amiga so porting Z80 source code to Amiga would be simpler.
Kamelito
http://files.programmersheaven.com/ASM/68000/z80conv/
-
Here's the my slow flame/plasma on HiSpeed Pascal
{ Flame.pas ; HiSpeedPascal Amiga/TP 7.0 compatibly (c) aGGreSSor, 30-Jun-00 }
program Flame;
uses Crt,Graph;
var GrDriver,GrMode,x,y,n,m,i,r: integer;
A: real;
CTab: array [0..10,0..50] of integer;
procedure Clear_Tab;
begin
FOR x:=0 TO 50 DO
FOR y:=0 TO 10 DO
CTab [x,y]:=0;
end;
procedure RND_Tab;
begin
y:=10; Randomize;
FOR n:=0 TO 50 DO
begin
r:=Random(5);
CTab[n,y]:=r;
end;
end;
procedure Calc_Tab;
begin
FOR y:=1 TO 9 DO
begin
FOR x:=1 TO 49 DO
begin
A:=Int((CTab[x+1,y+1]+CTab[x-1,y+1])/2);
CTab[x,y]:=Trunc(A);
end;
end;
end;
procedure Print_Tab;
begin
FOR y:=1 TO 9 DO
FOR x:=1 TO 49 DO
putpixel (x+135,y+160,CTab[x,y]);
end;
{ flame/plasma process.. }
begin
GrDriver:=CGA; GrMode:=CGAc0; {CGA, 320x200, 4 colors}
InitGraph (GrDriver,GrMode,' '); {0-black, 1-blue, 2-red, 3-magenta}
Clear_Tab; m:=0;
REPEAT
RND_Tab;
Calc_Tab;
Print_Tab;
UNTIL m=250;
m:=0;
REPEAT
FOR x:=0 TO 50 DO
begin
CTab[x,10]:=0;
end;
Calc_Tab;
Print_Tab;
m:=m+1;
UNTIL m=30;
{ delay (1000); }
CloseGraph
end.
Hehe
-
Digging up bones.
Cool seeing this thread is still going.
-
I would like to apologize to any and all here for any bad post that I have made.
Still looking looking to learn Pascal and Basic and maybe C,C++.
-
I would like to apologize to any and all here for any bad post that I have made.
Still looking looking to learn Pascal and Basic and maybe C,C++.
Don't feel bad. I have an unhealthy obsession with writing Objective-C code on the Amiga. :) We all have things we like. I'm just trying to figure out a way to get the source off my NeXTStep machine to my Amiga and see if I can port the OpenStep version of Objective-C to the Amiga instead; it has some features above and beyond what is provided in 2.95.3
-
I see myself bouncing between languages. :(
It would be good to be able to write for more than one platform.
-
We learned on Borland Turbo Pascal my first trimerster in college. I bought my SX-64 to class and was writing my programs in class on it.
We later used Borland C in a later class. By then I had an Amiga 500 and would run it under an IBM emulator and it was faster than the computers as school.
IIRC Pascal's purpose was to teach programming.
I dabble a little in others, once you get one they are all similar.
Pascal:
program Hello;
begin
writeln ('Hello, world.')
end. C:
#include
void main()
{
printf("Hello World \n");
}
Fortran:
program hello
print *,'Hello World'
end program hello
I bounce between them too.
-
Fortran does not seem to be as mysterious as I had thought.
-
Then there is Forth, Lisp, Python, etc :)
-
Does Lisp really do anything for AI?
-
Not sure anymore. I learned Pascal and C and was starting with others when I was in Electronic Engineering college. Sold my Amiga and went PC for a while and worked in IT supporting PC's then when XP was a dud I moved to Linux and moved away from Windows and into ITSecurity. Not that I have kids and they are getting older and into electronics and computers I'm trying to get back into both a bit more. One of my old projects was using a 68k for the main cpu of a robot with a Pic microcontroller based neural network around it. At the time I was using Parallax's PIC programmer which used their pseduo 8051 like assembly. Been messing with arduino a little,bit not and starting to get back into PIC using MPLAX C for C and Assembly. I was using A64 on the Amiga at the time so I could port my assembly over to to the 68k but the longer term goal was to use a higher level language there.
I've been trying to revive some of those old projects now and picked up an Amiga 2000 a while back but have to fix it. I've set up my environment under FS-UAE hoping I can just copy over to the Amiga when I get it working.
Back then doing complex stuff in assembly was tedious I was hoping to use soem match functions from a higher language to load lookup tables into the PIC's for the complex stuff.
-
Busy, Busy. :)
-
What would be nice if that Pascal programmers converts these tools to Amiga so porting Z80 source code to Amiga would be simpler.
Kamelito
http://files.programmersheaven.com/ASM/68000/z80conv/
Why would you need to port Z80 source code over to the Amiga when I've uploaded AmigaZ80 to AmiNet? You can run TurboPascal ver 3.0 on it.
-
Busy, Busy. :)
Yea, I get side tracked easy :)
What I was getting at is I'm not sure about LISP currently. I got sidetracked after college and am just catching back up.
Anyway, it looks like FPC (Free Pascal) is available for classic Amiga (though a little older version) as well as AROS and Linux, etc.
Last time I messed with Pascal after college GNU pascal was the big project but it appears its not been maintained i a while with free pascal being the current popular. They have their own IDE (Lazarus) as well if you like that style too.
-
I need to check out Lazarus. I keep hearing about it.
-
I try to search out and stick with the popular cross platform packages. I learned years ago after going from Amiga to PC (windows) that as PC software comes and goes your data gets stuck. Everything ported fine from the Amiga but later on I had some stuff in Microsoft publisher or Microsoft Money or Visio and the next release changed the file format and dropped support of the previous version. So I had to have two versions side by side to be able to open both new and old files. As I learned more and more and learned about open source packages such as OpenOffice, etc and moved my data there. Then i was able to move from Windows to Linux without worrying about my data as it was all still workable in the same software. I try to do the same here, what packages will work on Amiga, AROS, Linux so I can copy data/code from one to the other without issue.
-
Fortran does not seem to be as mysterious as I had thought.
There is more than one Fortran. The language went through a couple of major changes over time. The earlier releases where quite frighting. You had to put line numbers, instructions etc. in specific columns on the screen - actually, on the punch cards. This is where the Fortran had its home. Later releases of Fortran removed more and more such legacy requirements and tried to modernize the language. Nowadays, the real strength of Fortran is that it has very strong library support for numerical mathematics (BLAS, to name one), and for that reason, it is still used a lot.
-
@trekiej
you might be interested in the presentation on fortran and the amiga by alan swithenbank from last year's amiwest. i really enjoyed it, and there's a youtube video of it, too:
https://www.youtube.com/watch?v=m9AT3iVZ5-Q
-- eliyahu
-
Eugene nine:
I am not for sure how well the Amiga works with today's files. Maybe Aros has a better chance being on modern PC hardware. Linux seems to be able to go toe to toe in many areas.
Thomas R:
I guess I had my preconceived notions that Fortran needed Algebra,Trigonometry,Calculus, etc. to use. :)
eliyahu :
Thanks.
-
Cobol anyone? :D
-
Don't feel bad. I have an unhealthy obsession with writing Objective-C code on the Amiga. :) We all have things we like. I'm just trying to figure out a way to get the source off my NeXTStep machine to my Amiga and see if I can port the OpenStep version of Objective-C to the Amiga instead; it has some features above and beyond what is provided in 2.95.3
On a related note that you might be interested in:
MorphOS 3.10 new features includes "- Obj-C integration"
https://morph.zone/modules/newbb_plus/viewtopic.php?forum=3&topic_id=11905&post_id=129871&viewmode=flat&sortorder=1&showonepost=1
-
What would be nice if that Pascal programmers converts these tools to Amiga so porting Z80 source code to Amiga would be simpler.
Kamelito
http://files.programmersheaven.com/ASM/68000/z80conv/
Your link is currently down so I can't check it but if it's written in Pascal can't you just compile it with FPC?
https://blog.alb42.de/fpc-amigaaros-m68k/
-
Anyway, it looks like FPC (Free Pascal) is available for classic Amiga (though a little older version)
You might not have seen this, version 3.1.1 of FPC is pretty much the latest version.
https://blog.alb42.de/fpc-amigaaros-m68k/
I keep meaning to dig out my old floppies of Turbo Pascal code from the early 90's and give it a whirl.
-
Cobol anyone? :D
No commercial releases that I'm aware of. There have been a few Amiga stabs at it from coders but the one or two I have seen have been quite limited, IIRC.
Amazing that there is still a demand for the coders. It was more designed to handle huge datasets than anything, requirements that didn't fit inside most eqiupment using punched cards.Tape system rather than cards, then later on drives. Might take you an age to prepare the data for the program to crunch it into something else. But you could set up a batch and leave it running.
Drives really changed it, in the sense of having some way to interrupt the data flow and computation. And it wasn't always that accurate computation, in terms of producing "accurate" results at a given point in time. Kind of a built in lag with regards to the concept of time. It would get an accurate set of totalls, but not while the system was coming up with the answers.
-
How about Oberon?
http://aminet.net/package/dev/obero/Oberon
http://aminet.net/package/dev/obero/Oberon-NonFPU
-
How about Oberon?
http://aminet.net/package/dev/obero/Oberon
http://aminet.net/package/dev/obero/Oberon-NonFPU
Can't really offer an opinion. None of the links actually say what language it is. Or is a replacement Operating System? Looks that way. There is an Oberon ROM replacement listed for the Amiga.
Way after my time, never heard of it before. Couldn't even tell you what it does, and the people doing the documentation thought it was SO obvious, they didn't even write it down.
Or maybe they did, and I just missed it.
-
Can't really offer an opinion. None of the links actually say what language it is. Or is a replacement Operating System?
That is an excellent question. Oberon is really both. It's a whole system, an operating system build around a language that is related to Modula (which is related to Pascal). It's Wirth's attempt to design a complete system.
Of course, as an operating system, completely irrelevant, and probably only taught at the ETH in Zurich, Switzerland.
Kinna like "emacs", which is an editor build around a lisp interpreter. Or the other way round, depending on your point of view.
-
https://en.wikipedia.org/wiki/Oberon_(programming_language)
https://en.wikipedia.org/wiki/Oberon_%28operating_system%29
It looks pretty cool.
If I understand correctly there is as many OSes as there are programming languages to put on them.