News:

Welcome to RetroCoders Community

Main Menu

Question about AmigaBASIC "AREA" statement

Started by CharlieJV, Aug 12, 2023, 04:45 AM

Previous topic - Next topic

CharlieJV

I somehow ran into that statement, and whatever else I had planned to do tonight totally bit the biscuit.

I'm wondering how to implement a reasonable facsimile, and wanted to check, in case anybody knows AREA from AmigaBASIC and enough GW-BASIC/QBasic/QB64, am I understanding and translating AREA correctly to equivalent GW-BASIC code?

<<AREA "(25,10) - (50,20) - (0,20)">>
PSET (25,10) : AreaStartX = POINT(0) : AreaStartY = POINT(1)
LINE - (50,20)
LINE - (0,20)
LINE - (AreaStartX, AreaStartY)

<<AREA "(50,25) - STEP (20,15) - STEP (-10,15) - STEP (-10,-10)">>
PSET (50,25) : AreaStartX = POINT(0) : AreaStartY = POINT(1)
LINE - STEP (20,15)
LINE - STEP (-10,15)
LINE - STEP (-10,-10)
LINE - (AreaStartX, AreaStartY)

ZXDunny

It's a curious statement. The manual has this:

[i][b]AREA[/b] [[b]STEP[/b]](X,Y)[/i]

Defines a point of a polygon to be drawn with the AREAFILL statement.

The parameters x and y specify one of several points that Amiga Basic is to connect in forming a polygon with an AREAFILL statement. The AREAFILL statement ignores all AREA statements in excess of 20.

If STEP is included, x and y are offsets from the current graphics pen position. Otherwise, they are absolute values specifying a location in the current window.

So your example looks about right, but it's more for filling than outlines AFAICS. Although I had a copy of Amiga BASIC (and ABASIC) for my Amiga 1000, it was such a bad BASIC that I very rarely used it.

CharlieJV

Quote from: ZXDunny on Aug 13, 2023, 12:15 AMIt's a curious statement. The manual has this:

[i][b]AREA[/b] [[b]STEP[/b]](X,Y)[/i]

Defines a point of a polygon to be drawn with the AREAFILL statement.

The parameters x and y specify one of several points that Amiga Basic is to connect in forming a polygon with an AREAFILL statement. The AREAFILL statement ignores all AREA statements in excess of 20.

If STEP is included, x and y are offsets from the current graphics pen position. Otherwise, they are absolute values specifying a location in the current window.

So your example looks about right, but it's more for filling than outlines AFAICS. Although I had a copy of Amiga BASIC (and ABASIC) for my Amiga 1000, it was such a bad BASIC that I very rarely used it.

Hey, thanks!

I've always known about the Amiga, but only that the hardware was really good and video editing folk loved it.

There's no way I could explain how I fell upon the AmigaBASIC AREA and AREAFILL statements.  For whatever reason, I find AREA interesting.  Everything is a shiny object.

ZXDunny

You know how Commodore BASIC was really bad on the C64? Well, AmigaBASIC was somehow worse. It's famously awful. In fact, after playing with it for roughly an hour in about '88 I gave up and jumped to The Emulator - a BBC BASIC implementation for the Amiga 1000 which was a lot faster and nicer to use. Fancy that :)

CharlieJV

I think I'm starting to sense why I don't ever remember hearing much about BASIC programming on the Amiga.

Having bought a C-64 Mini because I find the thing so frigging cute and a nice little rig to do some nostalgic programming, I wondered the Amiga Mini 500 wasn't pitching any kind of retro programming too.  There it is.

ZXDunny

Well, we had GFA BASIC and of course ABASIC and Amiga BASIC but they were very little-used; by far the most active BASIC communities on the Amiga were the AMOS and Blitz folks. People made commercial titles in those.

CharlieJV

Quote from: ZXDunny on Aug 13, 2023, 02:26 PMWell, we had GFA BASIC and of course ABASIC and Amiga BASIC but they were very little-used; by far the most active BASIC communities on the Amiga were the AMOS and Blitz folks. People made commercial titles in those.

Ho-ho, I'm seeing some words I had long forgotten about.  There was a time long ago when I was reading everything I could get my hands on to keep up with all of the latest and greatest.

I gave that up around when the intel 486 came out.  Trying to keep up was getting to be a chore, not as much fun as in the 80's.  I just wasn't finding it exciting anymore.  Felt like all business?

ZXDunny

I hear that. For me, being relatively poor, I only had one machine - the Spectrum. Didn't update that until the late 80s to the Amiga when my Stepdad offered to sell it to me.

During the Spectrum era, I only had access to software that I could copy off my friends as buying it was out of the question. So no new BASIC interpreters, no compilers. Just what I had on ROM. When the Amiga came around and Magazine coverdisks were a big thing, I got access to more languages - AMOS, Bliz, Amiga E, Lattice C, that sort of thing but by then I was very much entrenched in BASIC so stuck with AMOS.

It wasn't until I moved to PC many years later that I started learning other languages.

CharlieJV

#8
My adopted grandpa (married into the family) bought me a Commodore VIC-20 back in '83.  I was super happy, then super sad (would not power on), then super happy (grandpa was an electronics technician, so he popped it open, saw that the fuse was blown, striped a fine piece of wire, ran it the length of the fuse to each connector, popped it back together, and it worked like that for the years that I used it, until I upgraded to a C-128.)

I loathed machine language, and did not love Commodore BASIC V2.0 (PEEK and POKE annoyed the daylight out of me), but I could live with that BASIC.

I was much happier with Commodore BASIC V7.0.


When I got to tech school, we dealt with the standards at the time: GW-BASIC (I think) and dBase on PC's, and the rest on VAX-11 (FORTRAN, PASCAL, COBOL).

GW-BASIC became my favourite by leaps and bounds.

Then at university: SQL, MODULA-II, C, Assembler, APL (I think that's it.)  Visual Basic on my own time.

During university years, on work terms, I was introduced to Gupta SQLWindows, For the first time, a programming language that completely fit my way of thinking.  Working with that in my career since 1995.  By leaps and bounds my favourite to this day.  Along with SQL.

Hobby programming, TiddlyWiki "programming" (Rapid Application Development style) is my second favourite.  So fast to get very cool stuff done (within the confines of a web browser and the wiki).

But BASIC of any kind, my heart belongs to BASIC.  Because I've only been around Microsoft variants all along, I tend to stick with them because I know them.  All of them, though: love to hear about them and see any of them still kicking around in any fashion.


ZXDunny

BASIC for me all day long also.

When I moved to a PC, I tried various BASIC interpreters but nothing "clicked" until I got a copy of Borland Delphi 1.0 for Windows 3.1 - that was amazing. Then Delphi 2 for Win95/98 and on and on as new versions were published on magazine cover CDs :)

During that time I went to med school, then on to hospital work, community health etc etc... until a guy in Belgium found my work on Spectrum emulators and SpecBAS and he offered me a job - which I'm still doing now, nearly 9 years later. I code for a living in Delphi, and so also for my hobby.

I don't have any formal qualifications in computing at all - my parents actively discouraged that, as they didn't see any future in it!