Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Curious if I am thinking about this right.
#21
(01-20-2025, 12:01 AM)SMcNeill Wrote:
(01-19-2025, 08:12 PM)bplus Wrote: the dueting continues

"Wrong direction"  ??? me with a true one-liner single statement showing another feature of QB64pe that can not be found in that other vesion of QB64.
Low bytes is good too, for sure!, but that is another direction ("colonscopey" let's call it) which I don't dare call "wrong", just a little misguided maybe. Smile

Code: (Select All)
Print Val(_InputBox$("Convert number from inches to mm.", "Enter a number")) * 25.4

Wrong direction in the fact that you went from a fully functional program to one that now does only half the required work in that single line of code. The above only converts from inches to mm, but it can't convert from mm to inches. It might be half the lines of what you had before, but it does half the work as well. I'd consider that going in the "wrong direction" in the code. You want to compare apples to apples, not apples to half-apples. Wink

I don't see any way to get full functionality and do both processes in a single line of code, without using a colon to cram multiple statements on that line. Maybe later tonight I'll brainstorm something crazy to do so, but I doubt it. Tongue

(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

Well so Steve can get a good nights sleep tonight:
Code: (Select All)
Print Val(_InputBox$("Convert number from inches to mm.", "Enter a number")) * 25.4, Val(_InputBox$("Convert number from mm to inches.", "Enter a number")) / 25.4

It's up to the user if he wants to enter the same number both times, so hey it's a little more flexible. Big Grin
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread

Possibly Related Threads…
Thread Author Replies Views Last Post
  draw command curious behavior James D Jarvis 5 1,230 08-04-2022, 02:24 PM
Last Post: TempodiBasic

Forum Jump:


Users browsing this thread: 1 Guest(s)