Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] BAM and _IIF with INPUT
#1
"Oh you speed demon" ah, Charlie I had so much less typing to do Smile

That is freak'n interesting code you had back there @CharlieJV
https://qb64phoenix.com/forum/showthread...6#pid31416

I see your Input can take variable string for/in the prompt And something funny about IF THEN Structure there too.
I must warn newbies that this BAM code is NOT QB64pe code but a very close cousin.
b = b + ...
Reply
#2
(01-19-2025, 08:20 PM)bplus Wrote: "Oh you speed demo" ah, Charlie I had so much less typing to do Smile
That is freak'n interesting code you had back there @CharlieJV
https://qb64phoenix.com/forum/showthread...6#pid31416
I see your Input can take variable string for/in the prompt And something funny about IF THEN Structure there too.
I must warn newbies that this BAM code is NOT QB64pe code but a very close cousin.
Oh, that should have been "speed demon"


There's nothing really "BAM-required" about my code.  I could style the code exactly as you would for QB64PE.

Program in BAM as if you were using GW-BASIC or QBASIC.  BAM allows me to format/organize code in a way that accommodates my challenges, but nobody else has to program that way in BAM.
-$60.00
Reply
#3
(01-19-2025, 08:20 PM)bplus Wrote: "Oh you speed demo" ah, Charlie I had so much less typing to do Smile

That is freak'n interesting code you had back there @CharlieJV
https://qb64phoenix.com/forum/showthread...6#pid31416

I see your Input can take variable string for/in the prompt And something funny about IF THEN Structure there too.
I must warn newbies that this BAM code is NOT QB64pe code but a very close cousin.

Hey, silly question.  What about the BAM code I shared would not work in QB64PE ?
Reply
#4
(01-19-2025, 11:59 PM)CharlieJV Wrote: Hey, silly question.  What about the BAM code I shared would not work in QB64PE ?

There's no INPUT _IFF format with QB64PE. Wink
Reply
#5
Quote:There's no INPUT _IFF format with QB64PE.  Wink

That's an INPUT statement followed by a string (well, the IFF results in a string)

QB64PE has INPUT, and doesn't the INPUT statement's first parameter allow a string?  Can't the string be a variable or the result string of a function ?  And the latest version of QB6PE has an IFF function, right?

What am I missing ?
Reply
#6
Oops, apologies.

I thought INPUT's first parameter in QB64 could handle string expressions.

Just tested and the INPUT statement's first parameter must be a string literal.


AND:  I forgot that BAM's INPUT statement works exactly as QB64 in that regard.  But not for  much longer ...
Reply
#7
Split this topic from the other discussion to clean it up a bit as we were meandering all over the place and getting off-topic in several different directions.  Moved this portion here, so Charlie can have it for reference as his last post on the subject was discussion changes coming to BAM concerning this concept of _IFF with INPUT.  Wink
Reply
#8
What I was finding weird about Charlie's code the If Then blocking:

Turns out Charlie uses no formatting options in the QB64 editor and blocks his IF THEN a different way more readable to him.

That issue resolved Smile his blocking style is comaptible to QB64 code just not IDE formatting.

The _IIF versus IFF that is a difference in BAM (IFF) and QB64PE (_IIF) as the use of a varaible string for prompt to Input are good reasons to SPLIT this topic out to BAM.
b = b + ...
Reply
#9
(Yesterday, 12:49 AM)CharlieJV Wrote: ...


AND:  I forgot that BAM's INPUT statement works exactly as QB64 in that regard.  But not for  much longer ...

I'm keeping it simple.  An open parenthesis will indicate a string expression to be used for the INPUT statement's prompt.

So for some future release of BAM:

   
Reply




Users browsing this thread: 9 Guest(s)