Less Than Or Equal?


#1

What would be the correct way to code a less-than-or-equal object for Axoloti?

XML for the symbol seems to be <=

Using the ==.axo object as a template, this seems like it should work but I get error messages:

<![CDATA[outlet_out= inlet_in1<=inlet_in2 ;]]>

Is there a different/better/correct way to express <= for Axoloti?


#2

I suppose you mean "less than or equal"? If so, are you trying to output a boolean value?
What is the error message?


#3

Ha, yes... Fixed my post, sorry for the confusion.

Just trying to create a boolean output - high when less-than-or-equal to an input value.


#4

/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:588:1: error: stray '\342' in program
;class instanceā‰¤__1{
^
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:588:1: error: stray '\211' in program
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:588:1: error: stray '\244' in program
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:640:6: error: stray '\342' in program
instanceā‰¤1 instanceā‰¤1_i;
^
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:640:6: error: stray '\211' in program
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:640:6: error: stray '\244' in program
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:640:6: error: stray '\342' in program
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:640:6: error: stray '\211' in program
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:640:6: error: stray '\244' in program
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:982:4: error: stray '\342' in program
instanceā‰¤_1i.Init(this );
^
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:982:4: error: stray '\211' in program
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:982:4: error: stray '\244' in program
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:999:4: error: stray '\342' in program
instanceā‰¤_1i.Dispose();
^
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:999:4: error: stray '\211' in program
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:999:4: error: stray '\244' in program
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:1024:3: error: stray '\342' in program
instanceā‰¤_1i.dsp(net0, net1Latch, net2);
^
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:1024:3: error: stray '\211' in program
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:1024:3: error: stray '\244' in program
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:601:1: error: field '__1' has incomplete type 'instance'
}
^
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:640:17: error: field '__1' has incomplete type 'instance'
instanceā‰¤1 instanceā‰¤1_i;
^
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:640:17: error: expected ';' at end of member declaration
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:640:17: error: redeclaration of 'rootc::__1'
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:601:1: note: previous declaration 'rootc::__1'
}
^
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:640:32: error: field '_1i' has incomplete type 'instance'
instanceā‰¤1 instanceā‰¤1_i;
^
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp: In member function 'void rootc::Init()':
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:982:20: error: expected initializer before '.' token
instanceā‰¤_1i.Init(this );
^
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp: In member function 'void rootc::Dispose()':
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:999:20: error: expected initializer before '.' token
instanceā‰¤_1i.Dispose();
^
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp: In member function 'void rootc::dsp()':
/Users/pmjulian/Documents/axoloti/build/xpatch.cpp:1024:19: error: expected initializer before '.' token
instanceā‰¤_1i.dsp(net0, net1Latch, net2);
^
make: *** [/Users/pmjulian/Documents/axoloti/build/xpatch.bin] Error 1
shell task failed, exit value: 2
Compiling patch failed ( untitled )


#5

Hm... I do not follow what the error is, but I just searched for the axo files contents and yes "<=" should work. See for example decode.axo


#6

It seems like there's some unicode characters in there that the compiler doesn't like. In the names in the XML file you can only use a-z, 0-9, underscore and space since these end up as identifiers in the C++ source code that gets generated from your .axo files (spaces get converted to underscores) . If I'm not mistaken you have given your object the name "ā‰¤" - try e.g. "less than or equal" instead.


#7

Ah, that's helped - thanks :+1:

I was also using the textural version of the expression for both the object name and calculation, where it works fine with "lt" etc as the object name and a straight <= for the calculation.