Home > Back-end >  Delphi syntax for help
Delphi syntax for help

Time:11-08

Just learning Delphi, grammar cannot be solved, please help

CodePudding user response:

0 is the string with quotes

CodePudding user response:

0 no quotes is an integer type, and the s [] in front of you, type mismatch

CodePudding user response:

If (s [4]='0') and...

CodePudding user response:

S defined as if you have any question, see the following when you use is an array, but really when you define characters
If you want to use s as an array, you have to define as array
Var s: an array of double;

CodePudding user response:

0 to add single quotation marks

CodePudding user response:

Condition judgment has a problem of the building Lord, your original intention should be, according to the current time string, such as 21:00:00, if points, second characters are '0', the condition was established, play music,
But different system Settings, TimeToStr string may be different, leading to the possibility of failure or abnormal memory access,
You can use the
DecodeTime (Now (), wHour wMin, wSec, wMSec);
Then judge wMin and wMin whether judgment to 0,
  • Related