10-08-2018 01:17 PM - edited 10-08-2018 01:18 PM
On piece of advice not related to the issue:
If you are displaying a constant, control, or indicator as something other than it's default format, make sure to make the display style (string) or radix (numeric) visible by right-clicking on the object and selecting Visible Items --> Display Style or Radix (as appropriate) so no one mistakes interpreting the data.
Ahh, the number 36.
No! it's actually 0x36!!!
10-08-2018 04:20 PM - edited 10-08-2018 04:38 PM
@gmille wrote:
I was able to understand the different steps used in the shown program with the exception of 1 being the format string constant at the top. What does the %s do? Also i have noticed that there is a \ in front of the string constant, what does this do? When outputting my numbers now it does it all correctly but after a break to the new line (because of the \n if i understand it correctly?) it starts with a break like shown in the picture. Is this related to that \ at the front of the constant?
You can right-click the string constant and select the display style. I selected \-codes because some of the characters are not visible otherwise (now spaces show as \s, tabs as \t, newline characters as \n, etc. and you can tell the difference), You should also select "visible items...display style" to see the purple \, telling you what the display style actually is. (Note that the \s are regular spaces, so don't enter "\s" in normal display, or you get two characters.) So please go back and correct your string after setting the correct display style.
(Side note: formatting statements understand a limited set of \-codes even if they are in normal display. For me, it is cleaner if you skip those and use \-codes display instead. The problem in your example is that your last space character is in normal format, and thus not visible)
The display style is purely cosmetic and does not change the actual string content. It just makes it more clear what's there, especially when dealing with code images.
Looking at your image, you also seem to have an extra space after the \n, that's why all your lines except the first one are indented.
10-08-2018 04:26 PM
Again, lotto numbers are integers. Your array needs to be blue, not orange. Right?
10-09-2018 03:15 AM
@gmille wrote:
I was able to understand the different steps used in the shown program with the exception of 1 being the format string constant at the top. What does the %s do? Also i have noticed that there is a \ in front of the string constant, what does this do? When outputting my numbers now it does it all correctly but after a break to the new line (because of the \n if i understand it correctly?) it starts with a break like shown in the picture. Is this related to that \ at the front of the constant?
%s tells the Format Into String where to place to input string. See the LabVIEW help on Format Into String, especially the Format Specifiers section.
@gmille wrote:
I have looked at the type of the array and indeed it should come out as an array of integer values but it shows as an array of doubles, any way to change this without having to make a new array? Thanks again!
Either right click a control\indicator, and set it's representation, or right click it and set it to Adapt To Type. Then make sure the type is an integer (I32 usually) by using the To Long Integer function.