// // functions needed to support "set" type in Pascal // like languages. Copyright 2021 Gerold Lee Gorman // Permission to redistribute and make use of this // software under GNU/MIT license. // #include "stdafx.h" #include #include "range.h" #include "sets.h" #define SETSZ (16) SET::SET() { memset(bits,0,sizeof(DWORD)*SETSZ); } SET::SET(int n, ...) { int i,j,k,val; va_list vl; va_start(vl,n); memset(bits,0,sizeof(DWORD)*SETSZ); for (i=0;i>5; k = val&0x1f; bits[j]|=(1<>5; j = s&0x1f; if ((bits[i]>>j)&0x01) result = true; else result = false; return result; } SET &SET::UNION(const SET&S) { int i; for (i=0;i>5; k = val&0x1f; bits[j]|=(1<>5; k = val&0x1f; bits[j]|=(1<