var
s: String;
x,y: Integer;
begin
...
s:= MaskEdit1.Text;
x:= StrToInt(Semi(s, '°')); //度
y:= StrToInt(Semi(s, '″')); //分
...
end;
//Semi函数如下
Function Semi(var s:string;m:string):string;
{
返回S串中M前的字符串 S中保留尾串 没找到返回整串,原串为空
}
var
n:integer;
begin
n:=pos(m,s);
if n=0 then
begin
result:=s;
s:='';
end
else
begin
result:=copy(s,1,n-1);
s:=copy(s,n+length(m),length(s));
end;
end;