Case - usando com strings |
Top Previous Next |
// Usando case com strings
case Trunc((Pos('Sam ','Harry /John /Samuel/Bob /Sam /Bill ')+6)/7) of 0: MessageDlg('The name is not in the list!',...); 1: MessageDlg('The name is Harry!',...); 2: MessageDlg('The name is John!',...); 3: MessageDlg('The name is Samuel!',...); 4: MessageDlg('The name is Bob!',...); 5: MessageDlg('The name is Sam!',...); 6: MessageDlg('The name is Bill!',...); end; |