Skip to content
  • rswindell's avatar
    Added support to console.print() for an optional P_* mode argument. Must · 2f0381d2
    rswindell authored
    be called as console.print(string, number), the number will be interpretted
    as the P_* mode flags value. Otherwise, all arguments are converted to strings
    and printed (as before).
    If anyone was calling console.print(string, number), they will get different
    behavior now. I couldn't find any evidence of anyone using this syntax for
    console.print(), so I think this should be okay.
    Only a limited set of P_* flags are supported (e.g. P_PETSCII, P_UTF8) - far
    fewer than console.putmsg(), but console.putmsg() is much more heavy weight
    and supports a lot more "features" likely to interfere with the expected user
    output. In general, try to use console.putmsg() only when printing multi-line
    text strings or when @-code expansion is needed. Otherwise, console.print()
    is usually better.
    2f0381d2