yasnippet/extras/imported/f90-mode/Arrays/Allocate and Deallocate array.yasnippet
2009-08-29 17:59:02 +00:00

10 lines
377 B
Plaintext

# -*- mode: snippet -*-
# key: alloc
# contributor: Translated from TextMate Snippet
# name: Allocate and Deallocate array
# --
allocate(${1:array}, stat=${2:err})
if ($2 /= 0) print *, "${1/(\w+).*/$1/}: Allocation request denied"
$0if (allocated(${1/(\w+).*/$1/})) deallocate(${1/(\w+).*/$1/}, stat=$2)
if ($2 /= 0) print *, "${1/(\w+).*/$1/}: Deallocation request denied$0"