Useless argument

Started by hydrophilic, September 11, 2007, 12:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hydrophilic

What BASIC 7.0 statment accepts an optional argument but ignores it?

Steve Gray

Is it "REM"?

But then, it's not specific to Basic 7...

hydrophilic

Nice try but no.  This is a legitimate argument (unlike REM and BEND).  Also I will give another clue, the command is not unique to BASIC 7.0 but you won't find it in BASIC 2.0.

That should narrow it down!

Blacklord

Quote from: hydrophilicNice try but no.  This is a legitimate argument (unlike REM and BEND).  Also I will give another clue, the command is not unique to BASIC 7.0 but you won't find it in BASIC 2.0.

That should narrow it down!
So it's shared with Basic 4.0 & 4.5 ?

nikoniko

This may not be what you mean, but MONITOR will ignore anything you append to it. Likewise, RETURN will do the same.

For instance, this won't throw a syntax error:

1000 if funds < 100 then return the CD I bought yesterday:else monitor my spending more closely but keep the CD

airship

I assume you mean an argument that is specified in the docs, but has no real effect? Or do you just mean 'ignores anything you type after it', like nikoniko says?

I know the PRG mentions a couple of commands that were burnt into the ROMS but which have no effect: OFF and QUIT (type them in and you get UNIMPLEMENTED COMMAND ERROR).

Hey, while researching this, I did run into this little item in the PRG:
    SAVE A$,8    Stores on disk, with the name stored in variable A$.
Isn't that a design error? Shouldn't there be parentheses around the A$ when you use a variable as a filename in a disk command? I just tried it in VICE and it works either way, but what about having some consistency, huh?

Anyway, I give up. :)
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

nikoniko

EDIT: Nevermind. My brain isn't working today, which is as usual.

hydrophilic

The statement really takes arguments unlike tricks with MONITOR, RETURN, etc.

To clarify, BASIC will check the argument to be sure it is 'valid' but ignores it anyway.

I just checked the Commodore 128 PRG and the argument is NOT listed although the statement is.

Quote from: adminSo it's shared with Basic 4.0 & 4.5 ?
I willl answer that with another hint:

Most Plus/4 users know the answer even if they don't realise it.

Blacklord

Quote from: hydrophilicWhat BASIC 7.0 statment accepts an optional argument but ignores it?
Errrr....  any more hints ?

hydrophilic

The Plus/4 hint wasn't enough?  Can I assume we don't have a lot of Plus/4 users here?

OK, this should be a give-away.

What feature of the Plus/4 is better than the C128?

airship

Its ability to suck? :)
.
.
.
.
Okay, it must have something to do with number of colors...
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

airship

Yep. It's the COLOR command. On the C128 it takes two legitimate arguments. The first is the source and the second is the color number. For example:

COLOR 5,14

sets the text color (5) to light green (14).

On the Plus/4, the COLOR command took a third argument for LUMINANCE, which could have an integer value from 0 to 7 (default=7). For example,

COLOR 5,14,3

sets the text color to light green, with luminance reduced to a value of 3.

All 16 color luminances of 0 were black, and all 8 of the black luminances were black, so 23 of these colors were exactly the same, though you could try to argue that setting the value to black and the luminance to 0 would be the darkest black.

What's interesting is I just tried it, and the C128 doesn't choke on values greater than 0 until you get to 256. It doesn't like negative values (except -0, of course), but you can feed it a floating point number from 0-255.9999999 and it's happy as a clam.

Here's another interesting BASIC 7.0 COLOR experiment. Type this:

COLOR 4, 2.99999999999999999999999999999  (that's 29 '9's)

See what color you get. Now try it with one more '9'.
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

Blacklord

Quote from: airshipHere's another interesting BASIC 7.0 COLOR experiment. Type this:

COLOR 4, 2.99999999999999999999999999999  (that's 29 '9's)
White border.

QuoteSee what color you get. Now try it with one more '9'.
Dark red border.


All of this on the VIC screen of course.

cheers,

Lance

hydrophilic

You got it airship! :D The C128 will accept 3 arguments to COLOR:

COLOR source, value [,intensity]

It checks that the optional 3rd argument is an unsigned byte but completely disregards it.  This is appropriate for the VIC since it doesn't support intensity like TED, but since the VDC does support intensity I wonder why it isn't considered in that case.  My guess it was just patched code from the Plus/4 and left in for compatiblitity.

WHY WHY WHY are the BASIC tokens compatible with the C128 and Plus/4 but not with the PETs?!!! :mad: :mad: :mad: Meaning the statements they have in common like DSAVE, CATALOG, etc.

On topic, your turn airship.

Blacklord

Quote from: hydrophilicOn topic, your turn airship.
Make sure it's a new thread!

airship

Hmmm... I'll have to think a bit about this. I want it to be TOUGH!!:skratta:
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine