closing CSL reduce window with button result in segfault
On the recuce homepage, www.reduce-algebra.com, there is a symbolic mode primer, and share is in the section "Communication between algebraic and symbolic modes". I think the problem with your solution to reverse a string here is that with explode you convert it to a list of characters, and try to return that to algebraic mode. If you compress it back, it works: symbolic procedure rev(a); begin; return compress(reverse(explode(a))); end; symbolic operator rev; rev("hello");
On the recuce homepage, www.reduce-algebra.com, there is a symbolic mode primer, and share is in the section "Communication between algebraic and symbolic modes". I think the problem with your solution to reverse a string here is that with explode you convert it to a list of characters, and try to return that to algebraic mode. If you compress it back, it works: symbolic procedure rev(a); begin; return compress(reverse(explode(a))); end; symbolic operator rev; rec("hello");
On the recuce homepage, www.reduce-algebra.com, there is a symbolic mode primer, and share is in the section "Communication between algebraic and symbolic modes". I think the problem with your solution to reverse a string here is that with explode you convert it to a list of characters, and try to return that to algebraic mode. If you compress it back, it works: symbolic procedure rev(a); begin; return concat(reverse(explode(a))); end; symbolic operator rev; rec("hello");
You're absolutely right, sorry. I have a second try here: symbolic procedure joinstr(a, b); begin; return concat(a, b); end; symbolic operator joinstr; s:=joinstr("Hello", " world!"); s; You could also just use concat in symbolic mode: a:="Hello"; b:=" world!"; share a, b; symbolic; c:=concat(a, b); share c; algebraic; c;
You're absolutely right, sorry. I have a second try here: symbolic procedure joinstr(a, b); begin; return concat(a, b); end; symbolic operator joinstr; s:=joinstr("Hello", " world!"); s;
Joining strings: procedure joinstring(a, b); begin; write a, b; end; joinstring("Hello", " world!");
This might be the same as bug #82 . There a solution was given: add the option -w+.