Code: Select all
setDetails(
pFirstName : String ;
pLastName : String
) : Boolean ;
begin
if pFirstName.containsSpecialCharacters or
pLastName.containsSpecialCharacters then
// Invalid first or last name, so bail now
return false ;
endif;
// The names validate ok, so set the properties and return true to indicate success
self.firstName := pFirstName ;
self.lastName := pLastName ;
return true ;
end;
Return to “General Discussion”
Users browsing this forum: No registered users and 39 guests