RosettaCodeData/Task/Variable-size-Get/Racket/variable-size-get.rkt

6 lines
186 B
Racket
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
#lang racket
(require ffi/unsafe)
(define-syntax-rule (sizes t ...)
(begin (printf "sizeof(~a) = ~a\n" 't (ctype-sizeof t)) ...))
(sizes _byte _short _int _long _llong _float _double)