Passing array values via Switch - Case

Posted By: boatman

Passing array values via Switch - Case - 11/28/14 02:23

Hello

Is it possible in Lite-C to pass values to an array via a switch...case statement? For example:

switch()
case "my array values" : return {0, 1, 1, 0, 1, 1, 1};

var my_array[7] = "my array values"

I get a syntax error that I seem to be able to trace to the winged brackets.
Posted By: jcl

Re: Passing array values via Switch - Case - 12/01/14 17:59

You can not return an array this way. Even if you could, it would be ineffective - better retur only a pointer to an array.
© 2024 lite-C Forums