Picaxe linux compilers cannot compile #define example

steliosm

Senior Member
Hello all.

I would like to define a few things in my program and I was getting an 'Unknown symbol' error while trying to check the syntax. I copied the Example #2 from the #define help page #define just to be sure and I noticed that even this cannot run properly:

This is what I get when I try a syntax check:
Code:
PICAXE-08M2 Compiler
Version 3.1
Copyright (c) 1996-2014
Revolution Education Ltd


	sertxd( #w0, ms, cr, lf )
	               ^
line# 4, col# 16

Error: Unknown symbol - ms

This is the example code:
Code:
#define ms "milliseconds"

main:
	sertxd( #w0, ms, cr, lf )
	w0 = w0 + 1
	pause 1000
	goto main
Anyone got any ideas?
 

hippy

Technical Support
Staff member
The #DEFINE is not supported by the PICAXE compilers, but is handled by the PICAXE pre-processor. The pre-processor is currently only supported for Windows / PE6 and not on Linux.
 
Top