# Tips for Golfing in Symja

Symja is a "computer algebra language & Java symbolic math library for Android NCalc calculator". It's a fun little language, so I'm wondering if y'all have any tips for golfing in Symja.

As per usual, "remove comments", etc, isn't really an answer. It turns out that there is no comment system in Symja, so "remove comments" isn't an answer. :P

• remove comments – Si Random Mar 21 '20 at 23:12
• @QuoraExpert I would, but there are no comments to remove in the first place! :P – lyxal Mar 21 '20 at 23:19
• I should use this language more, that way I don't have to make up any excuses for never commenting my code :D – hyper-neutrino Mar 22 '20 at 0:37
• LOL! NICE EDIT!! – Si Random Mar 22 '20 at 1:06

# Don't Use Print...Use the Formatted Output

Here's an example fizzbuzz:

For(i=1,i<101,i++,s="";If(Mod(i,5)==0,s=s<>"Fizz");If(Mod(i,3)==0,s=s<>"Buzz");If(Mod(i,5)*Mod(i,3)!=0,s=s<>ToString(i));Print(s))


Now, this is alright, but it can be improved:

For(i=1,i<101,i++,If(Mod(i,5)==0,s=s<>"Fizz");If(Mod(i,3)==0,s=s<>"Buzz");If(Mod(i,5)*Mod(i,3)!=0,s=s<>ToString(i));s=s<>"\n");s


Sure, it's only two bytes shorter, but hey, it's two bytes shorter.

Just put all the output into a string and tack a ;<variable_name> onto the end and you'll have a shorter program (usually).