+1 888 340 6572
MultiCharts Project Management
Go to the previous open issue
Go to the previous issue (open or closed)
Please log in to bookmark issues
Open Feature request MC-1563

Allow ":" operator for formatting strings and booleans in print statement

Go to the next issue (open or closed)
Go to the next open issue

This is a follow-up suggestion to a post in the discussion forum, linked below. I'll often print a log to the output window for debugging purposes, using code like this:
Print(ELDateToString(Date), " ", Symbol, " ", Condition1, " ", Condition2, " ", Value1:10:2, Value2:10:2);
I use the ":" operator with numeric values to help the columns line up and make the output more readable.
Unfortunately, the ":" operator doesn't work with strings or booleans. As a result, the first four columns in the above output will each have variable width, and none of the columns will line up consistently. This makes it much more difficult to scan the output log quickly and find the information I'm looking for.
It would be nice to be able to replace the above code with something like this:
Print(ELDateToString(Date):20, Symbol:10, Condition1:10, Condition2:10, Value1:10:2, Value2:10:2);
I.e., this would force the firsst column to have a width of 20 characters, and force the second, third, and fourth columns to have a width of 10 characters each. That way, all of the information would line up in a nice tabular format.
The same applies for the other keywords that allow the ":" operator, like Text() and MessageLog().
 It's possible to get this result by formatting the strings and booleans through custom functions (like the "_PadStr" function in my discussion post), but this results in messy code. It would be much cleaner if this could be supported natively in EasyLanguage through the ":" operator.

Steps to reproduce this issue

See above.

Comments (0)
There are no comments
Issue basics
  • Type of issue
    Feature request
  • Category
  • Targeted for
    Not determined
  • Status
    Not Reviewed
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (2)
People involved
  • Posted by
    user-offline.png  Xyzzy (Xyzzy)
  • Owned by
    Not owned by anyone
  • Assigned to
    Not assigned to anyone
  • Subscribers
    0 subscriber(s)
    Click here to show the list of subscribers
Times and dates
  • Posted at
  • Last updated
Issue details
  • Resolution
    Not determined
  • Severity
Attachments (1)
Commits (0)
There are no code checkins for this issue
Duplicate issues (0)
This issue does not have any duplicates