On Tue, 6 Aug 2019 at 15:43, Alexandre Torres Porres porres@gmail.com wrote:
Em ter, 6 de ago de 2019 às 01:30, Tsz Kiu Pang osamupang@gmail.com
escreveu:
an expression has to always output a value (?), but if we are implementing "if", "else", "then" operators, an outlet does not have to necessarily output anything,
so yeah, maybe a new class creator with a different orientation is all we need.
Not sure if this is related, but I was just looking at the class creator
of expr in the file x_vexp_if.c, and in the function expr_setup, there is a section commented as "expr initialization". I notice that apart from creating the class "expr", the class "exprproxy" also has to be created.
/* * expr initialization */ expr_class = class_new(gensym("expr"), (t_newmethod)expr_new, (t_method)expr_ff, sizeof(t_expr), 0, A_GIMME, 0); class_addlist(expr_class, expr_list); exprproxy_class = class_new(gensym("exprproxy"), 0, 0, sizeof(t_exprproxy), CLASS_PD, 0); class_addfloat(exprproxy_class, exprproxy_float); class_addmethod(expr_class,(t_method)expr_version, gensym("version"), 0);
These two classes seem to be created using the class_new function separately, and at the moment I can't seem to find the "glue" that connects exprproxy_class and expr together, it would be great if someone could please shed some light on this...
Cheers, TK