program strDemo;
#include ("stdlib.hhf");
static
string1: string;
string2: string;
begin strDemo;
str.alloc( @size(char) * 16 );
mov(eax, string1);
stdout.put("Enter String1: ");
stdin.readLn();
stdin.gets( string1 );
stdin.flushInput();
str.alloc( @size(char) * 16 );
mov(eax, string2);
stdout.put("Enter string2: ");
stdin.readLn();
stdin.gets( string2 );
clc();
str.eq(string1, string2);
if ( @c ) then
stdout.put(string1, " equal ", string2, nl);
else
stdout.put(string1, " not equal ", string2, nl);
endif;
str.free(string1);
str.free(string2);
end strDemo;
HLA判断字符串是否相等
最新推荐文章于 2023-10-03 19:10:26 发布