Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: aristarkos on January 07, 2009, 10:55:14 PM
-
Long ago I wrote a little Amiga Basic program for a game called Master Mind. Now I'm an old newbie. How can I get my old program to run on my PC?
-
AFAIK, not at all, unless you run an emulator. AmigaBasic requires a specific kickstart version (V1.2) to run, and the source code is saved in a non-standard tokenized format that only the Amiga Basic interpreter understands.
Jens
-
I've successfully compiled Amiga Basic using ACE, but it will only run on an Amiga of course, or in my case, the WinUAE emulation.
If you have the text of your basic script, can you not re-write it in a Windows basic interpreter? There must be some of those out there that look similar to the old Amiga Basic.
-
Once upon a time, many decades ago I was given a basic
program written by a friend. It was in Apple II Basic.
I re-wrote it for the C64 and eventually for the C128 using
Basic 7 and then Basic 8. I added graphics and fancy fonts.
I had thought about converting it to the old basic that came
with the old crappy IBM machines that were around then. But
never got around to it.
There is some very good basic programming software out
there for the Amiga but I don't know any names.
-
Thanks for all the ideas.
I have an emulator, but I'm new to it. How would I get Amiga Basic running on my emulator?
I'm liking the idea of re-writing for Windows because then I could share it more easily. I was able to get a six page printout of the program. After a text-scan and few fixes, I have the program in text form. Except for possibly the SAY and SOUND commands, I would guess that it's close to being compatible to several of the easier languages.
I found Liberty Basic. Heard of that?
Meanwhile I'll still be looking for more old games for the emulator...
-
hrmmmmm interesting thought: an Amiga Basic emulator for Windows which does not require a full AmigaOS in UAE setup.
-
What version of windows are you running. You might have a basic with it. Open a command prompt on your windows machine . Windows key + R , then type cmd and enter.
when the comand p[rompt comes up, type qbasic
-
LoadWB wrote:
hrmmmmm interesting thought: an Amiga Basic emulator for Windows which does not require a full AmigaOS in UAE setup.
No... Please no... AmigaBasic has no right to live...
Why not use this project as an excuse to learn C? Bloodshed's Dev C++ is a nice IDE...
-
Or VB, nothing wrong with latest versions of VB .net good place to start.
-
JJ wrote:
Or VB, nothing wrong with latest versions of VB .net good place to start.
Or ECMAScript which I personally prefer to VB, since it's more structured and portable...
-
Isnt that basically javascript and mainly web geared ?
-
JJ wrote:
Isnt that basically javascript and mainly web geared ?
The latest JavaScript is a form of ECMAScript, but ECMA Script is not limited to the DOM as used by browsers... Though with HTML 5 comming through, the DOM is set to become a REALLY powerful system (chrome)... Expect to see lots more apps written in this!!! :-o
i
-
Use JAVA-script for ultra portablility. I used it when I wanted to convert my MasterMind version from AmigaBASIC to Windows/Linux.
Old school BASICs like GWBasic and QBasic (the latter shares a lot of commands with AmigaBASIC (which is no surprise, both come from MicroSoft)) tend to trip over 64-Bit Windows-versions.
Shameless plug to my implementation (CSS capable browser like FireFox needed!): Spongebob Mind (http://www.elf8.nl/Mastermind/Mastermind.html)
-
Schoenfeld wrote:
AFAIK, not at all, unless you run an emulator. AmigaBasic requires a specific kickstart version (V1.2) to run, and the source code is saved in a non-standard tokenized format that only the Amiga Basic interpreter understands.
Jens
NOT TRUE .........
I have Amiga Basic running on my A2000 with 3.1 roms and
OS 3.1. (runs great)
I really don't know why they bash Amiga Basic so much.
Its easy to use, there's plenty of books written on it
and a forum (ACE Basic) on YAHOO supporting it.
I have been playing with it for several years.
I have Blitz, and AMOS but I still like Amiga Basic better
for its ease of use (I ignore the NAY-Sayers.
Mel
-
@melott:
I've done a lot of programming in Amiga BASIC and was extremely happy when the ACE version became available. Made life a lot easier.
However, I partly agree with you on the compatibility of Amiga BASIC and more modern systems. When programming on the Amiga 3000 with some FAST RAM and kickstart 2 (and later 3.1) I had to use 'NoFastMem' to get it to work. Otherwise it wouldn't. This 'NoFastMem' trick wasn't needed after the conversion to ACE BASIC.
-
melott: I was wondering, what processor you had in your 2000, I had read the only real problem with Amiga Basic was that it didn't run on anything better than 68000, or possibly 68010 ?? anyway, I am certain that AmigaBasic stopped working after my first accelerator purchase..('030/50Mhz) I had read somewhere that there is a workaround for this...
One thing I know, AmigaBasic ran fine with Kickstart 1.3, I never used any earlier version KS... (the 500 did come with a '1.3 enhancer pack (sp?)' though... but Amiga Basic worked fine...)
-
All you Basic fans might like RealBasic. It has a beautiful IDE which IMO rivals all of the pro development environments (very similar to the one in Delphi 7 before they changed it), the code completion works properly, it has a powerful class system with many useful classes built in, and despite all those features it is still really easy to and the code is nice and readable.
Also, it can cross-compile for Windows, OS X and Linux.
--
moto
-
motorollin wrote:
All you Basic fans might like RealBasic.
--
moto
I just downloaded it for Windows. Will give it a whirl. The pro version is $500.
-
I registered the standard version. Can't remember what the difference is now, but I haven't come across anything I can't do in the standard version!
--
moto
-
amiga_3k wrote:
@melott:
I've done a lot of programming in Amiga BASIC and was extremely happy when the ACE version became available. Made life a lot easier.
However, I partly agree with you on the compatibility of Amiga BASIC and more modern systems. When programming on the Amiga 3000 with some FAST RAM and kickstart 2 (and later 3.1) I had to use 'NoFastMem' to get it to work. Otherwise it wouldn't. This 'NoFastMem' trick wasn't needed after the conversion to ACE BASIC.
Yes... I've run into that problem also. I don'r really know
why its that way (turn off FastMemory) on my A3k 3.1 roms
and 040 WarpEngine.
I have an A2000 with 3.1 rom and an 2630 accelerator and
4 megs ram with Amber card (scan doubler) that I use for
playing around with in Amiga Basic. I 'DON'T' have to turn
off FastMemory on the A2k.
I have also used an A2620 card and an GVP TeckMagic 060 @50
with 128 megs.
Didn't need all that Horse power of the 060 so I sold it.
I'm happy with the 020 or 030, they are fast enough for
what I do in AmigaBasic.
Mel
-
aristarkos wrote:
Long ago I wrote a little Amiga Basic program for a game called Master Mind. Now I'm an old newbie. How can I get my old program to run on my PC?
You could try freeBasic (http://www.freebasic.net/)
It is an open source version of Microsoft Quickbasic.
As AmigaBasic was made by Microsoft too, the syntax is probably very similar.
FreeBasic can compile your Program to a real executable, so you wont need a Basic Interpreter anymore.
-
motorollin wrote:
All you Basic fans might like RealBasic.
--
moto
I'm not so much into basic but I have gambas (http://gambas.sf.net/) in my bookmarks.
greets,
Staf.
-
At one point Real Basic was available for the Amiga after Microsoft abandoned the platform. I'm not sure if it was still working when the OS went to 2.0. The cross platform nature made it the best choice in the late 80s. Glad to see them still around!
-
try
Purebasic for mac/windows/linux/amiga
http://www.purebasic.com/
its the *only* basic programming language thats almost write once - run anywhere for these platforms.
or
Visual Basic 'just to get it working' on windows.
-
@moto
Yes, I agree. AmigaBasic was one of the better BASICs for the Amiga. It's too bad that Microsoft didn't continue supporting it with versions that supported processors > 68K and Fast RAM.
For "modern" BASIC programming on the Amiga PureBasic is without a doubt the best.
-
Aww... And nobody's mentioned Microsoft's Small Basic (http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx)! :lol:
- Ali
-
No one has mentioned that AmigaBasic is compilable
using the ACE compiler and supported in the ACE forum.
It appears that most Amigans are not aware that
ACE is an upgraded version of AmigaBasic.
And again, all these other basics mentioned are not
nearly as well documented on the Amiga.
So it seems to me that the logical choice for the
novices and intermediate programmers is AmigaBasic.
Mel
-
melott wrote:
No one has mentioned that AmigaBasic is compilable
using the ACE compiler and supported in the ACE forum.
It appears that most Amigans are not aware that
ACE is an upgraded version of AmigaBasic.
And again, all these other basics mentioned are not
nearly as well documented on the Amiga.
So it seems to me that the logical choice for the
novices and intermediate programmers is AmigaBasic.
Mel
Actually, I did mention ACE (Third post from the top). I've used to compile Amiga Basic.
-
asymetrix wrote:
try
Purebasic for mac/windows/linux/amiga
http://www.purebasic.com/
its the *only* basic programming language thats almost write once - run anywhere for these platforms.
Unfortunately:
December 10, 2006
PureBasic v4.00 for Amiga is released as open source due to no longer being officially supported.
-
Fester wrote:
Actually, I did mention ACE (Third post from the top). I've used to compile Amiga Basic.[/quote]
Yes you did ... sorry,.. I guess I was just reiterating
what you said.
Mel
-
Is C really so hard, that you want to stick with BASIC?
-
bloodline wrote:
Is C really so hard, that you want to stick with BASIC?
YES IT IS! I've been programming in C for years and still want to go back to Basic. So badly, in fact, that I'm writing a compiler for Basic (with the help of Sidewinder).
It should be compatible with AmosPro in the first iteration with ACE and others set to become available in the new parser generator format later on.
-
bloodline wrote:
Is C really so hard, that you want to stick with BASIC?
? - Never thought about it that way. I don't have a problem with C. I use what I feel like. I'm not programming anything for work or fun these days anyway.
-
SamuraiCrow wrote:
bloodline wrote:
Is C really so hard, that you want to stick with BASIC?
YES IT IS! I've been programming in C for years and still want to go back to Basic. So badly, in fact, that I'm writing a compiler for Basic (with the help of Sidewinder).
But if you ignore pointers, references and datatypes (none of which you need for simple programs anyway), then there is nothing conceptually difficult about C... The syntax looks a little odd at first, but it is simple and consistant... If you have managed to get a handle on BASIC, then there is nothing difficult to understand in C!
-
The question: Is C really that difficult? I'd answer: Yes. It's great for doing al sorts of calcultions, sorting etc... what makes it really difficult is getting the results on screen when you want it in pixels / lines instead of characters.
That's why I use VisualBASIC to create the interface and draw-up any graphical output I want. The calculation functions I do with VisualC and create a .dll.
On the Amiga site, I never got into C programming. I stuck to Amiga BASIC and ACE (Amos was fun to play with but as it didn't allow for OS friendly programs to be created I ditched it).
-
amiga_3k wrote:
The question: Is C really that difficult? I'd answer: Yes. It's great for doing al sorts of calcultions, sorting etc... what makes it really difficult is getting the results on screen when you want it in pixels / lines instead of characters.
That's why I use VisualBASIC to create the interface and draw-up any graphical output I want. The calculation functions I do with VisualC and create a .dll.
On the Amiga site, I never got into C programming. I stuck to Amiga BASIC and ACE (Amos was fun to play with but as it didn't allow for OS friendly programs to be created I ditched it).
If it is simple graphics functions you are missing, then just include SDL!!! Seriously I never got into C until I discovered SDL :-)
-
bloodline wrote:
But if you ignore pointers, references and datatypes (none of which you need for simple programs anyway), then there is nothing conceptually difficult about C... The syntax looks a little odd at first, but it is simple and consistant... If you have managed to get a handle on BASIC, then there is nothing difficult to understand in C!
If you ignore the problem, that doesn't make it go away. It took me years to learn C even after I learned Basic and Pascal. I should have just stuck with Pascal and learned Delphi instead of C. C++ is also a pain.
-
@bloodline:
Pardon my ignorance... but I've never heard of SDL :-S. Would it provide functions for, for instance, drawing a line between two coordinates? Could you point me to a good starting-point for information on this? I'm willing to learn :-).
-
SamuraiCrow wrote:
bloodline wrote:
But if you ignore pointers, references and datatypes (none of which you need for simple programs anyway), then there is nothing conceptually difficult about C... The syntax looks a little odd at first, but it is simple and consistant... If you have managed to get a handle on BASIC, then there is nothing difficult to understand in C!
If you ignore the problem, that doesn't make it go away. It took me years to learn C even after I learned Basic and Pascal. I should have just stuck with Pascal and learned Delphi instead of C. C++ is also a pain.
Eh? I mean that you don't need things like pointers, references and datatypes if you want to write simple programs in C... Just like you don't need them in BASIC... Though BlitzBasic also had these features... Then once you are used to the C syntax then you an learn about the more advanced concepts...
You have to be kidding about C++ is is a huge improvment over C!!!
-
bloodline wrote:
Is C really so hard, that you want to stick with BASIC?
Yes. C is vile. Something as simple as converting a variable from one type to another is so complicated in C that it makes me want to smash my computer up. I once spent a whole day trying to find out how to use a variable which, for some perverse reason, had to be a "const char *" (whatever that is) as an argument to a function which wanted a string variable. There was seemingly no simple way of doing it. Trying to understad the difference between the different variable types seemed to require me to read pages and pages of documentation, and not one single method I found to convert the variable worked.
So yes, C is ghastly. Basic any day please.
--
moto
-
amiga_3k wrote:
@bloodline:
Pardon my ignorance... but I've never heard of SDL :-S. Would it provide functions for, for instance, drawing a line between two coordinates? Could you point me to a good starting-point for information on this? I'm willing to learn :-).
Yes exacty, it is a C library that provides these functions! :-)
Head over to SDLorg website, if you need any help let me know!
-
motorollin wrote:
bloodline wrote:
Is C really so hard, that you want to stick with BASIC?
Yes. C is vile. Something as simple as converting a variable from one type to another is so complicated in C that it makes me want to smash my computer up. I once spent a whole day trying to find out how to use a variable which, for some perverse reason, had to be a "const char *" (whatever that is) as an argument to a function which wanted a string variable. There was seemingly no simple way of doing it. Trying to understad the difference between the different variable types seemed to require me to read pages and pages of documentation, and not one single method I found to convert the variable worked.
So yes, C is ghastly. Basic any day please.
--
moto
Wash your mouth out young man! :-)
You need to cast then, for example
float real_number = 92.4;
int number = (int) real_number;
The "(int)", converts the floating point number into an integer... Easy :-)
But if you are doing something string heavy.. Then use C++, the string object is wonderful :-)
-
Tried casting, but can't remember whether it worked. As for the string object, it wouldn't let me turn anything in to a string or a string in to anything else. I gave up after several days of frustration and did the same thing in basic in about 10 minutes.
--
moto
-
char* just means that the function wants a pointer to the string rather than passing the whole string (which would be slow)... You proabably should have referenced the string :-)
-
Just program in malbolge or LOLCODE...
Hello World
malbolge
(=<`:9876Z4321UT.-Q+*)M'&%$H"!~}|Bzy?=|{z]KwZY44Eq0/{mlk**
hKs_dG5[m_BA{?-Y;;Vb'rR5431M}/.zHGwEDCAA@98\6543W10/.R,+O<
LOLCODE
HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE
-
:lol: @LOLCODE :-D
-
bloodline wrote:
Eh? I mean that you don't need things like pointers, references and datatypes if you want to write simple programs in C... Just like you don't need them in BASIC... Though BlitzBasic also had these features... Then once you are used to the C syntax then you an learn about the more advanced concepts...
You have to be kidding about C++ is is a huge improvment over C!!!
I learned Assembly on the 68000 before I learned C. That's the only way I could understand it. Otherwise I'd still be learning it.
As for C++, it is an improvement over C. It isn't an improvement over an Object Oriented Basic like VB.NET or anything like that.
-
bloodline wrote:
amiga_3k wrote:
@bloodline:
Pardon my ignorance... but I've never heard of SDL :-S. Would it provide functions for, for instance, drawing a line between two coordinates? Could you point me to a good starting-point for information on this? I'm willing to learn :-).
Yes exacty, it is a C library that provides these functions! :-)
Head over to SDLorg website, if you need any help let me know!
Link: http://www.libsdl.org/ (http://www.libsdl.org/)
-
SamuraiCrow wrote:
bloodline wrote:
Eh? I mean that you don't need things like pointers, references and datatypes if you want to write simple programs in C... Just like you don't need them in BASIC... Though BlitzBasic also had these features... Then once you are used to the C syntax then you an learn about the more advanced concepts...
You have to be kidding about C++ is is a huge improvment over C!!!
I learned Assembly on the 68000 before I learned C. That's the only way I could understand it. Otherwise I'd still be learning it.
I could never go back to ASM now :-) I like all the creature comforts of C/C++ too much now!
As for C++, it is an improvement over C. It isn't an improvement over an Object Oriented Basic like VB.NET or anything like that.
Well, I can't really comment... I think VB is a crime against nature... Though I did like BlitzBasic a bit... That would be quite good with some OOP features added...
Actually... AmigaE always looked more like a dialect BASIC, than anything else to my eyes... :-D
-
An interesting discussion ..
Am enjoying and learning from it.
Mel
-
melott wrote:
An interesting discussion ..
Am enjoying and learning from it.
Mel
People forget Amiga.org has lots of really really talented coders in many languages.. if anyone has any problems I expect someone here can help... I know I've had loads of help from people here (Which makes me want to return the favour) :-)
-
@bloodline:
I'm ashamed to admit that I'm using a WinXP machine at the moment :oops:. Any tip on what freeware c/c++ version to use on WinXP? I don't want to go through the hassle of installing VisualStudio.
-
amiga_3k wrote:
@bloodline:
I'm ashamed to admit that I'm using a WinXP machine at the moment :oops:. Any tip on what freeware c/c++ version to use on WinXP? I don't want to go through the hassle of installing VisualStudio.
I used to use MinGW and Bloodshed's Dev C++ on WinXP... it's a great IDE system and really fun to use.
If you use a Mac... then XCode is great... GDB makes life so simple...
-
If you use WinXP... then here:
http://sourceforge.net/project/downloading.php?groupname=dev-cpp&filename=devcpp-4.9.9.2_setup.exe&use_mirror=mesh
-
@ Bloodline:
Thanks a lot! I've just installed it and toying around with it. Has been a good 4 years since I last used C++ so I'm currently studying 'Hello World' again :-D.
I'll first try to get back into the basics of C++ again, then I'll try and add eyecandy step by step.
-
bloodline wrote:
char* just means that the function wants a pointer to the string rather than passing the whole string (which would be slow)... You proabably should have referenced the string :-)
I really have no idea what any of that means... I'll just stick to basic ;-) I like programming because I enjoy thinking about the procedure and logic of how the application should work. What I don't like is the intricacies of the language getting in the way.
--
moto
-
amiga_3k wrote:
@ Bloodline:
Thanks a lot! I've just installed it and toying around with it. Has been a good 4 years since I last used C++ so I'm currently studying 'Hello World' again :-D.
I'll first try to get back into the basics of C++ again, then I'll try and add eyecandy step by step.
Cool, DevC++ uses gcc, so anything you write (and eventually with SDL), will be compilable (with little or no changes) on MacOSX and Linux as well... Oh and some old system called an armooger or something ;-)
-
motorollin wrote:
bloodline wrote:
char* just means that the function wants a pointer to the string rather than passing the whole string (which would be slow)... You proabably should have referenced the string :-)
I really have no idea what any of that means... I'll just stick to basic ;-) I like programming because I enjoy thinking about the procedure and logic of how the application should work. What I don't like is the intricacies of the language getting in the way.
--
moto
Hehehe :-)
well, for those interested:
int A = 5; //means that the integer variable A = 5
int* B = &A; //means that variable B, now is a pointer to the integer variable A
All types with a * after them are memory addresses.
The "&" operator means, "The Address of"
If you pass a variable to a function, you will notice in the C code that the variable is actually copied to a new variable for use in the function... if you pass a pointer of the variable to the function instead, then the function will act upon the original variable rather than a copy of it!
If the function requires char* and your string is in an array (it is important to remember that a string is an array of characters)... then you need to reference your array with a preceding "&" operator.
-
@bloodline:
I think portability is a good thing. Especially with niches like the AmigaOS.
Don't expect top of the line action games. I'll first have a go at porting my JavaScript versions of Mastermind and 'HotNumber DeLuxe', both being rather old-school 2D games. Don't expect results very soon as I'm about to change homes (and computers, once again, next system probably an EeeBox).
-
amiga_3k wrote:
@bloodline:
I think portability is a good thing. Especially with niches like the AmigaOS.
Don't expect top of the line action games. I'll first have a go at porting my JavaScript versions of Mastermind and 'HotNumber DeLuxe', both being rather old-school 2D games. Don't expect results very soon as I'm about to change homes (and computers, once again, next system probably an EeeBox).
Well, JavaScript is so close to C syntax it really shouldn't take long to get into... You are seriosuly going to love SDL, anyone who has spent much time blitting gfx around on the Amiga, will have no problems with SDL!
-
>by motorollin on 2009/1/10 15:55:46
>I really have no idea what any of that means... I'll just stick to basic I like programming because I enjoy thinking about the procedure and logic of how the application should work. What I don't like is the intricacies of the language getting in the way.
>--
>moto
BASIC is supposed to be simpler than other languages so if simplicity is what you want, I would vote for BASIC. There's always the CALL statement to call ASM procedures from AmigaBASIC... Now if AmigaBASIC was in ROM (at least most of it), that would be even better as you could boot up directly into it in a second (like on C64/Atari/old PCs). Then you could easily write some easy program for testing ports/doing math/testing some feature/etc.
-
@ bloodline
As an occasional programmer I again and again get into messes and troubles (at least when a ointer refers to a pointer and such complicated things) with pointers and references. I guess I know the logic behind it, but w/o regular practise it is often hard. But still from those three languages (C++, Matlab and Holywood) I seriously looked into I like it somehow most.
Anyway, I wanted to take the opportunity to advertise for Hollywood: Simple, but also powerful and write once, compile for MorphOS, AOS3.x, AOS4.x, Windows, OS X.
-
bloodline wrote:
Actually... AmigaE always looked more like a dialect BASIC, than anything else to my eyes... :-D
PortablE would probably be the best Amiga-related language available today. It uses C++ as a backend on the high-end systems, and traditional AmigaE as a backend on the classics.
-
what about pascal? what do people think of it?
And as regards to AmigaBasic by MS: Is there anything worth running on the Amiga that has been written using it?
-
I used to use Pascal in Delphi 7 and I liked it. It's very readable and has nice functions for variable manipulation. There is a Pascal compiler in Aminet but I have never used it.
--
moto
-
zylesea wrote:
@ bloodline
As an occasional programmer I again and again get into messes and troubles (at least when a ointer refers to a pointer and such complicated things) with pointers and references. I guess I know the logic behind it, but w/o regular practise it is often hard. But still from those three languages (C++, Matlab and Holywood) I seriously looked into I like it somehow most.
Anyway, I wanted to take the opportunity to advertise for Hollywood: Simple, but also powerful and write once, compile for MorphOS, AOS3.x, AOS4.x, Windows, OS X.
Honestly Pointers aren't really as bad as people make out... just think of a variable as a variable, just the same as in BASIC... then a pointer is the actual memory address of that variable and its datatype.
With a variable in any programming language, it has three properties... Its location in the computer (the address), its size (the datatype) and it's value (the data stored there).
A pointer is the first two properties, a variable is the second two properties.
when you define:
int A=5;
You know two things about it, the datatype (size), which is an integer (on Amiga that is 32bits) and you know its value (5).
To get the address you need to put an "&" in front of the variable... now you need to store that address, this is where the pointer comes in... since your variable is an interger, your pointer needs to know the size that it's pointing to thus:
int* B = A;
Has now stored the address and size of variable A into B.
Remember:
int is an integer variable.
int* is a pointer to an integer variable (it doesn't actually have to point to a variable, but that is another topic :-) ).
Now we can do thing a bit clever using the "*" operator... if you put the * in front of a pointer then all operations happen to the location pointed to by the pointer, thus:
*B=6;
A=6;
both of the above assignments do the same thing. Both assign the value 6 to the variable A. But really you can ignore pointers to begin with... they are only really needed for doing advanced stuff that you can't do with BASIC.
The big advantage of pointers is that they allow a function to act on the original variable rather than on of copy of the variable... thus the function doesn't need to return any value, and no data needs to be copied, making the whole process much faster. I have no idea how I could survive without pointers now :-D (I'm not looking forward to trying C#)...
But if you come from BASIC, function/procedure support is often very limited and you can just write your C code all inline (ie in the main function).
-
.
aristarkos wrote:
Thanks for all the ideas.
...
I found Liberty Basic. Heard of that?
...
Have used liberty basic a bit. Used it to re-write a home management system that used to be in GWbasic. It did the job and was cheap to register. Fast as well. Got to add voice samples instead of a set of different chimes.
Probably a good choice if you know basic want to stay away from separate compilers and newer languages
-
@ Bloodline
Thanks for your attempt to explain pointers to me. While this thank holds no irony (I always welcome occasions to think again about C++ stuff), you may have read that I alrady wrote that I have understood pointers and references is general. But when not programming too often, you soon end up in some mess.
And your suggestion to avoid pointers - well my own classes and so aree doing as much as possible. But when using the MS MFC or low level driver stuff or e.g. just want to open an Amiga window by using intuition.library you just cannot avoid heavy use of pointers.
Look, code like this is not easy to maintain if you are an occasional coder. Well, thing is it works, but if I try to reread my own code like e.g. this:
void DAQ::AOfillBuf(void* pwBuf, DWORD dwAoBufferSize,
DWORD dwClk, DWORD dwChListChan, DWORD dwMode) // fill buffer operations
{
DWORD* pdwBuffer = NULL;
WORD* pwBuffer = NULL;
pdwBuffer = (DWORD*)pwBuf;
DWORD *myLpvResult;
myLpvResult= reinterpret_cast(lpvResult);
...
}
I think it is not too intuitive (part of the mess I guess comes from MS and their many datatypes).
As said this is no rant against C++, but it is difficult when you use it only occasionally. And that is a thing many routined programmers often forget.
-
@zylesea
The explanation wasn't just for you :-)
If you find a nasty function that is complex yo use... just wrap it up in a nice friendly class, and document it well :-D
-
bloodline wrote:
@zylesea
If you find a nasty function that is complex yo use... just wrap it up in a nice friendly class, and document it well :-D
Well, that's what I do - at least the first part of your suggestion. Documentation - hmpf (singing: la la la) ;-)!
-
PureBasic may not be officially supported, but it does work.
The v4 core is good enough so that the GUI editor can work with it.
Purebasic also creates the asm code for the commands :).
What we need is a community driven basic language.
I like E optimizing, effeciency.
If we had an Amos -> AmigaE/PortableE translator, then use the E compiler we can have a greate portable,easy to use programming suite :).
-
The graphics and sounds in my program were minimal. It's basically a text-based mind-teaser game. I was able to get it running in Liberty Basic and now I'm looking into Run Basic ... because I'd like to get on the web and play it with my cell phone. Unfortunately, I put goto statements all over the place so as far as coverting this particular program to JavaScript ... I think I'll pass.
"Run BASIC is a programmable web application server. You can use it to create your own custom web applications with the easy to use BASIC programming language."
-
No... Please no... AmigaBasic has no right to live...
Comment ridiculous.
-
This is a year-old thread.
What we need is a community driven basic language.
I like E optimizing, effeciency.
If we had an Amos -> AmigaE/PortableE translator, then use the E compiler we can have a greate portable,easy to use programming suite :).
Mattathias is making an Amos to LLVM translator. Early versions were going to use C as a backend but some command structures in Amos are not supported under C. (That includes the On N Gosub command and even the gosub command in general.)
-
just program in malbolge or lolcode...
Hello world
malbolge
lolcode
++++++++++[>++++++++>++++++++++>+++>+<<<<-]>.>+++++.++++++++++..>++.<<-.>-------------..>+.>.
:) :) :)
-
You all have your heads in the sand.
COBOL or DIE!
GFA Basic was a pleasure to program in. My grandfather had a copy of it for his Atari 520ST, and I recently picked up one for the Amiga. Very nice. Although, I admittedly haven't come close to using its full ability. Just for a little fun.
Oh, and RPG-II. Yeah, you should definitely mess with that.
-
I'll pipe in a bit here with some support for c#
C# via mono or .net is a great way to learn C syntax and OOP in general.
It's the greatness of C++ minus all the irritants, no pointers (usually), garbage collection, and some great objects built into the framework for you to use.
With the added benefit that you can move to java with ease if you want to...
(However starting with java directly is annoying due to the bad GUI support)
Simply put, Anyone starting out with c/c++ as a beginner has a long road to productivity, C# makes the road MUCH shorter.
GL in whatever you pick up.
(LOLCODE looks superior to all tho haha, thats a good one)
-
Anyone know if any good free modula 2 stuff around. learnt it a bit in uniy , thinks its based on pascal from memory
-
Is C really so hard, that you want to stick with BASIC?
The ugliness and side-effects is the exact opposite of what BASIC is for.
BASIC is straight-forward and the logic is obvious. If you would like, I can end every line with a : in basic but what would be the point? Those semi-colons just add ugliness.
C is a relic created in a time where every byte counted because memory was limited. It needs to die.
Just look at VB.net code compared to the equivalent C# code.
Just look here as an example: http://forums.asp.net/t/971802.aspx
C/C++/C# = fugly
-
Wow, this is a year old thread! I was thinking Jens was back...
Nobody mentioned TrueBasic which, I think, was largely sold in North America. It's claim was portability between systems.
Perhaps it's in the water, but I've just recently started relearning to program basic on the C64. I was getting into it when the Amiga was released and never went back. Who knew poke 53280,0 could be so much fun!
Bob
-
@lou_dias
A language is not ugly simply because you don't like the syntax. I can make exactly the same claim that basic is obscenely, putrescently ugly. It's haplessly verbose, wordy and coding in it feels like trying to write English with boxing gloves on. That would be my opinion only, however, not some established argument against it.
There's a damn good reason why so many languages have syntax derived from C. It's well-defined, concise and expressive. It's probably the single most successful programming level language of all time and if you think it's on it's way out any time soon, well, don't hold your breath. C syntax based languages exist that cover every major programming paradigm and plenty of more obscure ones.
C is a relic created in a time where every byte counted because memory was limited. It needs to die.
Not liking the syntax is your prerogative but this is just untrue.
Your argument that the syntax is a product of memory constraint is incorrect since it is the size of the resulting object code that matters, not the source. Even a machine with a limited amount of memory can compile large source from disk. The data structures that any compiler builds (C, Fortran, BASIC or whatever other language you fancy) during compilation are far more significant than the actual size of the textual source.
Even if you were to make the claim that it was to reduce the size of source that was being edited, if memory constraints were a prime motivator, there'd be no reason for it to allow long function, variable and structure names, the only practical limits for which are set by the linker.
C syntax is compact simply because it doens't need to be any more verbose.
By all means, prefer using a different syntax, but don't embarass yourself by trying to present your personal dislike of the syntax as some sort of established argument against it.
-
@lou_dias
A language is not ugly simply because you don't like the syntax. I can make exactly the same claim that basic is obscenely, putrescently ugly. It's haplessly verbose, wordy and coding in it feels like trying to write English with boxing gloves on. That would be my opinion only, however, not some established argument against it.
There's a damn good reason why so many languages have syntax derived from C. It's well-defined, concise and expressive. It's probably the single most successful programming level language of all time and if you think it's on it's way out any time soon, well, don't hold your breath. C syntax based languages exist that cover every major programming paradigm and plenty of more obscure ones.
Not liking the syntax is your prerogative but this is just untrue.
Your argument that the syntax is a product of memory constraint is incorrect since it is the size of the resulting object code that matters, not the source. Even a machine with a limited amount of memory can compile large source from disk. The data structures that any compiler builds (C, Fortran, BASIC or whatever other language you fancy) during compilation are far more significant than the actual size of the textual source.
Even if you were to make the claim that it was to reduce the size of source that was being edited, if memory constraints were a prime motivator, there'd be no reason for it to allow long function, variable and structure names, the only practical limits for which are set by the linker.
C syntax is compact simply because it doens't need to be any more verbose.
By all means, prefer using a different syntax, but don't embarass yourself by trying to present your personal dislike of the syntax as some sort of established argument against it.
I was correct about memory constraints as I was referring to the source code files not the executable. Alot of text editors had contraints back in the day.
Here's a big obscure problem with C: if X=1 {
Side-effects are what makes C crap.
You can defend it just like people defended albums over CD's...feel free.
C has undefined bahavior and lacks alot of features.
http://en.wikipedia.org/wiki/C_(programming_language)
C is the original Dodge Viper of programming languages (recall that the original did not even have outer door handles)...
-
I was correct about memory constraints as I was referring to the source code files not the executable. Alot of text editors had contraints back in the day.
They did, but that is not the reason why C is terse. As pointed out, you can have function names, structure names, variable names as long as you like. The C specification only defines the minimum required supported length.
struct MyVeryLongStructureName {
};
is hardly something you'd expect from a language that was designed for "small memory" editors, is it?
Here's a big obscure problem with C: if X=1 {
I assume you meant:
if (X=1) {
}
That's completely well defined. Pointless, yes, but well-defined. That will always execute the code in the block, where as this will always skip it:
if (X=0) {
}
There's no ambiguity here, just programmer error. It isn't as if '=' in C _ever_ means "equal to", it _always_ means "assign to lvalue".
Side-effects are what makes C crap.
You can defend it just like people defended albums over CD's...feel free.
C has undefined bahavior and lacks alot of features.
http://en.wikipedia.org/wiki/C_(programming_language)
C is the original Dodge Viper of programming languages (recall that the original did not even have outer door handles)...
I was talking about the C syntax, since this is what you complained about, now you are complaining about the limitations of the C language implementation in isolation. Make up your mind which it is you have a problem with. Is it C's syntax or is it C as a programming language?
As pointed out, the C syntax covers many, many languages. I challenge you to find any important programming paradigm for which there is no C syntax derived language that incorporates it.
-
Re:C vs. Basic
IMHO, C syntax exists because of a deficiency in old parsers and parser generators. They process tokenization and syntactic analysis in two separate stages. This was made obsolete with modern PEG parser generators which process multi-character tokens effortlessly using lookahead and backtracking instead of tokenization.
For a nice example of a PEG parser generator written in C who generates code in C, look at http://piumarta.com/software/peg/. My partner is programming a version of it which generates LLVM Assembly instead of C at http://sourceforge.net/projects/llvmpeg/.
-
Buh... buh... I'm a mod so you have to agree with what I say or I'll ban your ass... :lol:
Just kidding, seriously....
-
Buh... buh... I'm a mod so you have to agree with what I say or I'll ban your ass... :lol:
Just kidding, seriously....
Egregious abuse of power. Rise up against the tyranny!
::ducks the ban-hammer:: :-p
-
::ducks the ban-hammer:: :-p
/me deploys the MIRV Carpet Layer edition of ban hammer....