Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A bit dim about "DIM"
#8
(04-30-2022, 05:08 AM)SMcNeill Wrote: Not quite.  It's:

Code: (Select All)
DIM AS DOUBLE A, B, C
DIM AS INTEGER X, Y, Z

DIM AS <TYPE> then the variable names.

Here, a quick little reference for the differences, written up and shared in our Learning Resources area.  https://qb64phoenix.com/forum/showthread.php?tid=279

I hope that helps clear up any confusion anyone may have had with the new syntax.  Wink

It's quite right what you write, Steve,
but QB64 also accepts my version of DIM:

Code: (Select All)
'DIM test
OPTION _EXPLICIT

DIM a, b, c AS INTEGER
DIM x, y, z AS DOUBLE

a = 1: b = 1: c = 1
x = 1.234
y = 1.234
z = 1.234

PRINT a + b + c
PRINT x + y + z

QB64 compiles this without any problems!

... but only c is explicit declared as integer and only z as double... I understand.
Reply


Messages In This Thread
A bit dim about "DIM" - by PhilOfPerth - 04-30-2022, 03:34 AM
RE: A bit dim about "DIM" - by OldMoses - 04-30-2022, 03:52 AM
RE: A bit dim about "DIM" - by Pete - 04-30-2022, 03:56 AM
RE: A bit dim about "DIM" - by PhilOfPerth - 04-30-2022, 04:16 AM
RE: A bit dim about "DIM" - by BSpinoza - 04-30-2022, 04:56 AM
RE: A bit dim about "DIM" - by Pete - 04-30-2022, 05:07 AM
RE: A bit dim about "DIM" - by SMcNeill - 04-30-2022, 05:08 AM
RE: A bit dim about "DIM" - by BSpinoza - 04-30-2022, 06:10 AM
RE: A bit dim about "DIM" - by PhilOfPerth - 04-30-2022, 10:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sub not Reconizing Dim as String pmackay 18 1,477 10-16-2025, 03:32 PM
Last Post: pmackay
  need help printing a scaled string in a custom font to a 32-bit image madscijr 9 1,168 07-03-2025, 04:48 PM
Last Post: SMcNeill
  DIM - AS - VARIABLE TYPE likely bug bartok 25 5,556 05-06-2024, 08:21 PM
Last Post: SMcNeill

Forum Jump:


Users browsing this thread: 1 Guest(s)