Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
An array of variant types
#1
Is there a simpler way to write an array of variables of the following variant types?

The following code works, but I think it's neither elegant nor concise.

Thanks in advance for any suggestions or help.

Function arrVar
Code:
Copy      Help
function` [`_A1] [`_A2] [`_A3] [`_A4] [`_A5] [`_A6]

ARRAY(VARIANT) args.create
sel getopt(nargs)
,case 1 args[]=_A1
,case 2 args[]=_A1; args[]=_A2
,case 3 args[]=_A1; args[]=_A2; args[]=_A3
,case 4 args[]=_A1; args[]=_A2; args[]=_A3; args[]=_A4
,case 5 args[]=_A1; args[]=_A2; args[]=_A3; args[]=_A4; args[]=_A5
,case 6 args[]=_A1; args[]=_A2; args[]=_A3; args[]=_A4; args[]=_A5; args[]=_A6


Messages In This Thread
An array of variant types - by Davider - 06-06-2025, 11:11 AM
RE: An array of variant types - by Gintaras - 06-06-2025, 11:41 AM
RE: An array of variant types - by Davider - 06-06-2025, 12:24 PM
RE: An array of variant types - by Gintaras - 06-06-2025, 01:23 PM
RE: An array of variant types - by Davider - 06-06-2025, 01:47 PM
RE: An array of variant types - by Gintaras - 06-06-2025, 02:05 PM
RE: An array of variant types - by Davider - 06-06-2025, 02:13 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)