-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Strip whitespaces from input strings
- Loading branch information
Showing
4 changed files
with
66 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,29 @@ | ||
#include "mma/mma.fmod" | ||
|
||
#define assert(value) if (.not. value) then ; write(*,*) value ; call exit(1) ; end if | ||
|
||
program main | ||
use mma | ||
implicit none | ||
type(mma_comm), pointer :: comm | ||
integer :: ierror | ||
call mma_comm_register("test", ierror) | ||
call mma_comm_register("test ", ierror) | ||
assert(ierror == 0) | ||
call mma_print(ierror) | ||
assert(ierror == 0) | ||
call mma_initialize(ierror) | ||
assert(ierror == 0) | ||
call mma_comm_get("test", comm, ierror) | ||
assert(ierror == 0) | ||
call mma_comm_get("test ", comm, ierror) | ||
assert(ierror == 0) | ||
call mma_comm_get(" test ", comm, ierror) | ||
assert(ierror == 0) | ||
call mma_print(ierror) | ||
assert(ierror == 0) | ||
call mma_comm_register("test", ierror) | ||
assert(ierror /= 0) | ||
call mma_finalize(ierror) | ||
assert(ierror == 0) | ||
end program | ||
|