Talk:Metabox
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 printX numbers, where X is the value of the variable "a". You can print&by simply writingprint "&".Print variable "a" & "...", in my opinion, is much more, let's say, appealing (although maybe not very clear) thanprint variable "a" & print "...".
- In your 99 Bottles Of Beer example,
&is inside the string. Is that an error, then?
- In your 99 Bottles Of Beer example,
- Oh, absolutely. Thanks for the heads-up!
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."│ └────────────────────────────┘