I was working on an online version of pencil cards, and wanted to have some multi-line snippets like:
"""
rt 45
fd 70
rt 90
fd """ (except I used \n for actual newlines and it wasn't a multiline string, i.e.: 'rt 45\nfd 70\nrt 90\nfd')
But inside the palette, only the first line shows up. I was confused, since I know there are multi-line snippets present in the regular palette. Experimentation suggests:
Multi-line snippets are preserved if they represent a container statement, e.g. if, forever, functions, etc.
Comments are stripped out even within those (I wanted comments like "# put useful stuff here"
Is there a way to make Pencil Code preserve my multi-line block snippets the way I want them?
Update: the hacky solution that more or less works is to put parenteses around the entire thing, e.g. '(rt 45\nfd 70\nrt 90\nfd)', though it still looks weird.
I was working on an online version of pencil cards, and wanted to have some multi-line snippets like: """ rt 45 fd 70 rt 90 fd
""" (except I used \n for actual newlines and it wasn't a multiline string, i.e.: 'rt 45\nfd 70\nrt 90\nfd
')But inside the palette, only the first line shows up. I was confused, since I know there are multi-line snippets present in the regular palette. Experimentation suggests:
Is there a way to make Pencil Code preserve my multi-line block snippets the way I want them?