()((())((())
Is it correct sequence?
I need just a counter.
foreach char in string {
If next bracket is “(” then inc(counter);
If next bracket is “)” then dec(counter);
If counter < 0 then showmessage(“Error”);
}
()((())((())
Is it correct sequence?
I need just a counter.
foreach char in string {
If next bracket is “(” then inc(counter);
If next bracket is “)” then dec(counter);
If counter < 0 then showmessage(“Error”);
}
procedure TForm1.Button1Click(Sender: TObject); var KeyState : Word; S : String; begin KeyState := GetKeyState(VK_SCROLL); S := 'Клавиша: VK_SCROLL. Состояние:'; if KeyState and $8000 = $8000 then S := s+'down' else S := s+'up'; if KeyState and 1 = 1 then S := S + 'toggle on' else S := S + 'toggle off' ; ShowMessage( S ); end;