Set examples of correct usage.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(object), | intent(inout) | :: | self |
Object data. |
||
character(len=*), | intent(in), | optional | :: | examples(1:) |
Examples of correct usage. |
subroutine set_examples(self, examples) !< Set examples of correct usage. class(object), intent(inout) :: self !< Object data. character(*), optional, intent(in) :: examples(1:) !< Examples of correct usage. if (present(examples)) then #ifdef __GFORTRAN__ allocate(self%examples(1:size(examples))) #else allocate(character(len=len(examples(1))):: self%examples(1:size(examples))) ! does not work with gfortran 4.9.2 #endif self%examples = examples endif endsubroutine set_examples