You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: From Basic to Intermediate: Arrays and Strings (I).
In today's article, we'll start exploring some special data types. To begin, we'll define what a string is and explain how to use some basic procedures. This will allow us to work with this type of data, which can be interesting, although sometimes a little confusing for beginners. The content presented here is intended solely for educational purposes. Under no circumstances should the application be viewed for any purpose other than to learn and master the concepts presented.
Interesting, isn't it? But we’ve hit a small problem here. And this is exactly why I mentioned earlier that you need to pay attention to the details involved in string formatting. The issue, in this case, lies with the color value. Notice that it's displayed in hexadecimal format. However, the value shown in Figure 06 doesn't necessarily represent the color red. In fact, it could be representing something entirely different. Remember, color values are typically formatted as RGB, or sometimes ARGB. So just by looking at the hex value, it can be hard to tell what it really means. But with a small adjustment, we can change the output to be more intuitive and human-readable. To do this, simply change the code as shown below:
Once you execute the code with this new modification, the result will look something like this:
Figure 07
Wait! This is definitely not red. What appears here is blue. So what's going on here?
Author: CODE X