In a comment to the Day 4 installment, Richard Rose pointed out that WD17 is in fact out of beta. I need to crawl out from under my rock more often. Thanks Richard! I'm downloading the update now, but today's hour will still be with WD16.
...
As you can see from the screen shot, I rewrote my code to use the Length() function and that worked. Here are the results of the procedure call:
Automated testing
I don't want to have to run manual tests all the time. But as I've previously noted, it's easy to create automated tests. Again, from the Project Explorer I added a new test:
...
This suggests to me that strings in WinDev are more like .NET strings than like Clarion strings. In .NET, strings are immutable, meaning you can't change them; when you make what appears to be a change to an existing string, you're actually creating a new string to contain the result. I'm thinking a similar process is at work in the W language.
Resume your normal (string) route
As much as I like unit testing, I'm going to leave that for now and go back to the tutorial, which on page 57 is still on the subject of strings.
WinDev has the usual complement of string handling functions, including Upper(), Lower(), Left(), Right(), Length() etc. Trimming space characters is often important: the equivalent to a Clarion Clip(Left()) is NoSpace() which removes leading and trailing spaces. The string handling library is extensive - you can find a complete listing of functions here.
Handling numeric values
Numeric values are assigned using the usual operators, and you can also concatenate strings and numerics directly without having to cast the numeric values. Since + is both the concatenation and the addition operator, if you want to do addition instead of concatenation you should enclose the operation in parentheses.
...