/
niceSOFT
/
gawk
Обзор
Документация
Войти
/
niceSOFT
/
gawk
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
awklib/eg/lib/assert.awk
23 строки
531 B
Arnold D. Robbins
Add blurb pointing to manual to all example programs.
12 май 2025, 22:26
12 май 2025, 22:26
e11c16e
Код
Авторство
О чём код?
# assert --- assert that a condition is true. Otherwise, exit. # # This file and how to use it are described in the manual. # Therefore, we respectfully advise you to Read The Fine Manual # for more information. # # Arnold Robbins, arnold@skeeve.com, Public Domain # May, 1993 function assert(condition, string) { if (! condition) { printf("%s:%d: assertion failed: %s\n", FILENAME, FNR, string) > "/dev/stderr" _assert_exit = 1 exit 1 } } END { if (_assert_exit) exit 1 }