I need to see if one string is not the same AS EMPTY STRING. Something like: string != ''; How can I achieve it in Pascal?
The inequality operator is '<>', string <> '';.
You can use the Length function, which will return the string length.
s:='My string';
x:=Length(s);
if( x > 1 ) then writeln('The string is not empty') 
            else writeln('The string is empty');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With