So I’m trying to use cameradev as a parameter in a routine. Per the datatype details:
Data of the type cameradev must not be defined in the program. However, if it is then an error message will be displayed as soon as an instruction or function that refers to this cameradev is executed. The data type can, on the other hand, be used as a parameter when declaring a routine.
Obviously there are plenty of built in routines and functions that use cameradev as a parameter already.
It might be the case that they use it as a switch parameter.
The special type, switch, may (only) be assigned to optional parameters and
provides a means to use switch arguments, that is arguments that are only specified by names (not values).
Digging deep into the Kernal manual I found the solution in the ‘DATA TYPE VALUE CLASSES’ section. There is a table that shows ‘Possible and impossible combinations of object usage and type value class’. It indicated for parameters of type Non-value or semi-value you need to prefix with a VAR declaration.