Quick Propeller Tool request - Macros
M. K. Borri
Posts: 279
Hi, sorry for bothering but...
Could we have macros for commonly-used snippets of code that it's not worth calling as functions because of the overhead?
PRI ReadSensorVal(sensornum)
return long[noparse][[/noparse]@SensorData + sensornum]
could become just long[noparse][[/noparse][noparse][[/noparse]@SensorData + sensornum] ... but be more readable for the next unlucky sod who has to look at my code.
(crappy example, but you know where I'm going)
Or, some basic ability to inline functions, that way if you need to change one you can just change it in one place? I think SYMBOL does this in pbasic?
Could we have macros for commonly-used snippets of code that it's not worth calling as functions because of the overhead?
PRI ReadSensorVal(sensornum)
return long[noparse][[/noparse]@SensorData + sensornum]
could become just long[noparse][[/noparse][noparse][[/noparse]@SensorData + sensornum] ... but be more readable for the next unlucky sod who has to look at my code.
(crappy example, but you know where I'm going)
Or, some basic ability to inline functions, that way if you need to change one you can just change it in one place? I think SYMBOL does this in pbasic?