Shop OBEX P1 Docs P2 Docs Learn Events
Quick Propeller Tool request - Macros — Parallax Forums

Quick Propeller Tool request - Macros

M. K. BorriM. K. Borri Posts: 279
edited 2006-11-12 11:42 in Propeller 1
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?
Sign In or Register to comment.