Report Bugs Here

Moderator: Mmiscool

User avatar
By Electroguard
#45315 This is an unimportant 'rainy day' sort of thing...

Code: Select allprint "Local node name:   " & localname
print "Global name:       " & globalname
print "Group name:        " & groupname
print "Local IP address:  " & localIP

I expected the above to pad the variables neatly underneath each other, but the print function is stripping out the trailing spaces that are enclosed within the quotes and causing all the variables to directly follow after the ":"

Actually, when previewing this I noticed it did exactly the same the thing unless I marked it as code.

I've subsequently found out that html also strips out the excess blanks.
Is there some way of inserting spaces to shift text to the right without inserting visble characters?
User avatar
By Electroguard
#45335 Hi, thanks for the suggestion, but it only prints the extra characters literally, much as expected when looking at it.

I did try sending tab as chr(9) though, but that made no difference.

It seems something specifically to do with the colon, because I've found that commands which normally do accept multiple spaces inside of quote marks take the unrequested action of stripping out the excess after the colon - so it would seem to be an additional action that has been built in based on an assumption. I'm only mentioning it o avoid some head-scratching for others.
It's no great problem when you know, but a bit of a puzzle until you find out, cos my assumption has always been that all printable characters within quotes would be printed as-is.
User avatar
By cicciocb
#45339 It seems that the problem comes from the html part as it works properly on the serial port.
If you look at the html source (view - sources in the browser), you'll see that the spaces are there but the browser remove them.
Another fix is required.