Author Topic: I made an blonder, and QB64 -n- QB45 responded the same way.  (Read 3447 times)

0 Members and 1 Guest are viewing this topic.

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
I made an blonder, and QB64 -n- QB45 responded the same way.
« on: October 10, 2021, 01:07:54 pm »
Why would I even discuss the matter if it was that simple.  Both IDE's in my opinion should have puked for syntax not compile and run.  The results were the same for both.  I was going to create a temporary value f$.  Realized I wasn't going to do anything more with f$.  Decided to output the f$ directly to file. I did this: (the wrong way)

Do Until EOF(1)
    Line Input #1, f$
    p = InStr(17, f$, "\")
    Print #2, f$ = Right$(f$, Len(f$) - p)
Loop
System

Forgot to remove the "f$ = ".  My brain was on autopilot and fingers were just doing there thing.  IMHO, the IDE's should have puked.
I made a Blonder not blunder, see a previous post thread.

Now, somebody is going to say the precompiler could not possibly find all faults. (Granted!), But we have taken so much to being true to QB45, Even errors are the same.

OK, let the bashing commence.



FellippeHeitor

  • Guest
Re: I made an blonder, and QB64 -n- QB45 responded the same way.
« Reply #1 on: October 10, 2021, 01:10:02 pm »
Code: QB64: [Select]
  1. f$ = Right$(f$, Len(f$) - p)

The above evaluates to 0 if the values don't match; -1 if the values match. The compiler is doing as instructed ;-)

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: I made an blonder, and QB64 -n- QB45 responded the same way.
« Reply #2 on: October 10, 2021, 01:12:11 pm »
Like Fellippe was saying, it's evaluating the truthfulness of the statement and will output either a -1 or 0. Nothing wrong there.
Shuwatch!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: I made an blonder, and QB64 -n- QB45 responded the same way.
« Reply #3 on: October 10, 2021, 01:20:37 pm »
Quote
IMHO, the IDE's should have puked.

You probably got a 0, what more could you ask for?

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: I made an blonder, and QB64 -n- QB45 responded the same way.
« Reply #4 on: October 10, 2021, 01:36:14 pm »
Fellippe probably needs to apply some additional AI within the IDE along the lines of 2001: A Space Odyssey's HAL9000 computer where you'd receive the following message:

"I'm sorry Doppler, I'm afraid you can't do that"

in that very sinister voice.

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Re: I made an blonder, and QB64 -n- QB45 responded the same way.
« Reply #5 on: October 10, 2021, 01:39:53 pm »
what more could you ask for?

I did get a ZERO, asking for : Life, Brain, better dinner, more sleep time.  Not getting any of those.  I am just left holding a big fat ZERO.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: I made an blonder, and QB64 -n- QB45 responded the same way.
« Reply #6 on: October 11, 2021, 10:18:52 pm »
It's in SCREEN 0, so as far as I'm concerned, it's all good!

Not to worry, the curse of making a funny new word wares off rather quickly, after you stumble over it a couple of times. Now if you will excuse me, I have to respond in kind to a similar "blonder" and I want to get it over with before my crow gets cold.

Pete

Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/