Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 1032

 
valenok2003:
I'd like to understand how to handle strings in the new mokla4. Zeroing is also the way to go, but it doesn't add understanding ))).
You have initialization with empty strings there. ZeroMemory() will do that for string array.
 
valenok2003:
I'd like to understand how to handle strings in the new mokla4. Zeroing is also the way, but it won't add understanding )))).
Probably need to write your own functions for string array since string variable is essentially a uchar array. Or convert it to uchar array and work with it. Personally, I would find it easier to write a function than to convert, process and assemble back.
 
artmedia70:
You have an empty string initialization there. ZeroMemory() will do that for string array.

Is there such a thing as a string array in the new version of MOCL?

 
valenok2003:

Is there such a thing as a string array in the new version of MOCL?

Any array containing strings is a string array. Isn't it?
 
artmedia70:
Any array containing strings is a string array. Isn't it?
It is. Help me find a description of a string array in the documentation...
 
valenok2003:

Is there such a thing as a string array in the new version of MOCL?

Do you need to initialize the string array with empty strings? I showed you how to do it quickly. You can write your own function as suggested above.
 
valenok2003:
That's right. Help me find a description of a string array in the documentation...
Work with array members as string variables with string functions.
 

Thank you

 

Hello.

The time is not being returned correctly at the moment. For example, if the time is 12.04, it returns 12.4. Can you tell me how to make this function correct?

string label=StringConcatenate(Hour(),".",Minute());
 
abeiks:

Hello.

The time is not being returned correctly at the moment. For example, if the time is 12.04, it returns 12.4. Can you tell me how to make this function correct?

Well, Hour() and Minute() return the current hour and the current minute of the last server time at the moment of program start. And the returned values are of int type. And these are just integers. So you need to format them. For example, like this:

string label=IntegerToString(Hour(),2,'0')+":"+IntegerToString(Minute(),2,'0');