procedure for the validation of callsigns
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
#! /usr/bin/env /usr/local/bin/racket
|
||||
#lang racket
|
||||
|
||||
(define (call-valid? call)
|
||||
(and
|
||||
(<= (string-length call) 9)
|
||||
(andmap
|
||||
(or/c char-numeric? char-alphabetic? (curry char=? #\-))
|
||||
(string->list call))))
|
||||
|
||||
;; get callsign, first thing passed by BPQ
|
||||
(define call (read-line (current-input-port) 'any))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user