mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-14 05:23:04 +00:00
10 lines
377 B
Plaintext
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" |