Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ERROR: C++ compilation failed.
#2
Remove the parenthesis from around args.

Code: (Select All)
declare sub main
declare sub get_numeric_args(args() as double)

DIM args(4) AS DOUBLE
get_numeric_args args()
PRINT args(1)


SUB get_numeric_args (args() AS DOUBLE)
    args(1) = 123
END SUB

It's a long standing glitch with arrays, and one that just happens to be a real PITA to track down and sort out. Wink
Reply


Messages In This Thread
ERROR: C++ compilation failed. - by Ed Davis - 11-15-2022, 07:13 PM
RE: ERROR: C++ compilation failed. - by SMcNeill - 11-15-2022, 07:18 PM
RE: ERROR: C++ compilation failed. - by Ed Davis - 11-15-2022, 07:25 PM
RE: ERROR: C++ compilation failed. - by mnrvovrfc - 11-16-2022, 10:33 PM



Users browsing this thread: 1 Guest(s)