Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

New print() behavior?

in General Posts: 95

I may have missed it in a forum post or release notes, but can print() no longer take a comma-separated list of strings to print? If that’s the case, why the change?...and isn’t that core Lua and not a Codea call anyway? Maybe I’m going crazy...



  • Posts: 684

    print("hello","world") works for me in current version. are you sure they're all commas?

  • Posts: 95

    Well...I did say I might be going crazy! You are right. Truth is, I didn’t try it right before posting this question (bad Brian!). I noticed the issue recently (perhaps before I switched to the latest beta version?) and just got in the habit of using separate print calls for each value. Either something got fixed or I had a momentary lapse in my ability to print! I’m glad I was wrong...back to actual programming challenges...

    Sorry for the original post! @dave1707 , perhaps you could just delete all this?

  • dave1707dave1707 Mod
    Posts: 8,505

    Depending on the size of what’s being printed, things separated by comma may not be separated. It depends on where they fall compared to the tab positions. Does the code below show what you’re seeing. I posted about the print previously.

    function setup()
  • Posts: 95

    Huh. There’s a chance I’m not going crazy after all! That could be what I was seeing, and I just wasn’t being observant/thoughtful about my output. Thanks @dave1707

  • Posts: 684

    This seems odd to me. Is it "official Lua"? Normally(afaik) a tab guarantees at least one space so that if a left-justified field ends at a tab stop, the tab goes all the way to the next.

  • AnatolyAnatoly Mod
    Posts: 889

    That’s btw the reason why I don’t use commas, believe me, a simple .. “, “ .. concat is worth it.

Sign In or Register to comment.