Skip to content

Commit fa8fc68

Browse files
committed
FEAT: new native complement?
Returns TRUE if the bitset is complemented. Like: ``` >> complement? make bitset! [not] == true >> complement? make bitset! [] == false >> complement? complement charset "abc" == true ``` Implements: Oldes/Rebol-issues#1356
1 parent 9d619ac commit fa8fc68

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/core/t-bitset.c

+13
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,19 @@
511511
SERIES_TAIL(ser) = tail;
512512
}
513513

514+
/***********************************************************************
515+
**
516+
*/ REBNATIVE(complementq)
517+
/*
518+
// complement?: native [
519+
// "Returns TRUE if the bitset is complemented"
520+
// value [bitset!]
521+
// ]
522+
***********************************************************************/
523+
{
524+
return (BITS_NOT(VAL_SERIES(D_ARG(1))) ? R_TRUE : R_FALSE);
525+
}
526+
514527

515528
/***********************************************************************
516529
**

0 commit comments

Comments
 (0)