QB64 Phoenix Edition
[split] BAM and _IIF with INPUT - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: QBJS, BAM, and Other BASICs (https://qb64phoenix.com/forum/forumdisplay.php?fid=50)
+--- Thread: [split] BAM and _IIF with INPUT (/showthread.php?tid=3401)



[split] BAM and _IIF with INPUT - bplus - 01-19-2025

"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.php?tid=3395&pid=31416#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.


RE: Curious if I am thinking about this right. - CharlieJV - 01-19-2025

(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.php?tid=3395&pid=31416#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



RE: Curious if I am thinking about this right. - CharlieJV - 01-19-2025

(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.php?tid=3395&pid=31416#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 ?


RE: Curious if I am thinking about this right. - SMcNeill - 01-20-2025

(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


RE: Curious if I am thinking about this right. - CharlieJV - 01-20-2025

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 ?


RE: Curious if I am thinking about this right. - CharlieJV - 01-20-2025

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 ...


RE: [split] BAM and _IIF with INPUT - SMcNeill - 01-20-2025

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


RE: [split] BAM and _IIF with INPUT - bplus - 01-20-2025

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.


RE: Curious if I am thinking about this right. - CharlieJV - 01-21-2025

(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: