Talk:Metabox

From Esolang
Jump to navigation Jump to search

& Operator

When inside a string of text, how should & be interpreted? How would you print the character &? I think it would make more sense if there was a string interpolation character, or if it was simply print variable "a" & print "...".

- Bangyen (talk) 18:26, 30 June 2021 (UTC)

Well, & basically intersects two or more printable functions. For example, print variable "a" & " numbers" should print X numbers, where X is the value of the variable "a". You can print & by simply writing print "&". Print variable "a" & "...", in my opinion, is much more, let's say, appealing (although maybe not very clear) than print variable "a" & print "...".
-Batata (talk) 21:49, 30 June 2021 (UTC)
In your 99 Bottles Of Beer example, & is inside the string. Is that an error, then?
- Bangyen (talk) 04:55, 1 July 2021 (UTC)
Oh, absolutely. Thanks for the heads-up!
-Batata (talk) 11:27, 1 July 2021 (UTC)

Print Statements

Do print statements end in a newline? If not, how is a newline printed?

- Bangyen (talk) 18:59, 30 June 2021 (UTC)

Yes! But you can also use something like this to create a newline:
┌────────────────────────────┐
│print "This is a line.      │
│Here's a newline.           │
│And here's another newline."│
└────────────────────────────┘
-Batata (talk) 21:49, 30 June 2021 (UTC)