=pod =encoding utf8 =head1 NAME Muldis::D::Ext::Blob - Muldis D extension for bit string data types and operators =head1 VERSION This document is Muldis::D::Ext::Blob version 0.24.0. =head1 PREFACE This document is part of the Muldis D language specification, whose root document is L; you should read that root document before you read this one, which provides subservient details. =head1 DESCRIPTION Muldis D has a mandatory core set of system-defined (eternally available) entities, which is referred to as the I or the I; they are the minimal entities that all Muldis D implementations need to provide; they are mutually self-describing and are used to bootstrap the language; any entities outside the core, called I, are non-mandatory and are defined in terms of the core or each other, but the reverse isn't true. This current C document describes the system-defined I, which consists of undifferentiated bit string data types and operators, essentially all the generic ones that a typical programming language should have, but for the bare minimum needed for bootstrapping Muldis D, which are defined in the language core instead. This current document does not describe the polymorphic operators that all types, or some types including core types, have defined over them; said operators are defined once for all types in L. I =head1 TYPE SUMMARY Following are all the data types described in this document, arranged in a type graph according to their proper sub|supertype relationships (but that a few of them just reappear from the core set to provide a similar context, and aren't re-described here): sys.std.Core.Type.Universal sys.std.Core.Type.Empty sys.std.Core.Type.Scalar sys.std.Core.Type.Int sys.std.Core.Type.UInt sys.std.Core.Type.PInt # These are all integer types. sys.std.Blob.Type.PInt1_4 I =head1 SYSTEM-DEFINED BLOB-CONCERNING DATA TYPES =head2 sys.std.Blob.Type.PInt1_4 A C is a proper subtype of C where all member values are between 1 and 4. Its maximum value is 4. The cardinality of this type is 4. =head1 SYSTEM-DEFINED BLOB-CONCERNING FUNCTIONS These functions implement commonly used binary string operations. =over =item C This function results in the catenation of the N element values of its argument; it is a reduction operator that recursively takes each consecutive pair of input values and catenates (which is associative) them together until just one is left, which is the result. If C has zero values, then C results in the empty string value, which is the identity value for catenate. =item C This function results in the catenation of C instances of C. =item C This function results in the length of its argument in bits. =item C This function results in C iff its C argument is a substring of its C argument as per the optional C and C constraints, and C otherwise. If C or C are C, then C must occur right at the start or end, respectively, of C in order for C to results in C; if either flag is C, its additional constraint doesn't apply. =item C This function is exactly the same as C except that it results in the opposite boolean value when given the same arguments. =item C This function results in the bitwise I of its argument. =item C This function is a reduction operator that recursively takes each pair of its N input element values and does a bitwise I (which is both commutative and associative) on them until just one is left, which is the function's result. This function's argument values must all be of the same length in bits, that length being part of the argument's declared type (that is, C subtype) definition, and that is also the length in bits of the function's result. If C has zero values, then C will result in an appropriate-length string of identity/1 valued bits. =item C This function is the same as C but that it recursively does a bitwise inclusive-or rather than a bitwise I, and its identity value is composed of zero valued bits. =item C This function is the same as C but that it recursively does a bitwise exclusive-or rather than a bitwise inclusive-or. =back These functions convert between C values and canonically formatted representations of binary strings as character strings. =over =item C This selector function results in the C value that its C argument maps to when each input character represents a sequence of 1-4 bits, the number of bits per character being determined by the C argument; for example, if C is 1, then each input character is a [0-1] and represents a bit; or, if C is 4, then each input character is a [0-9A-F] and represents 4 bits. This function will fail if C can't be mapped as specified. =item C This selector function results in the C value where its argument is encoded using a character for each sequence of 1-4 bits, the number of bits per character being determined by the C argument. This function will fail if C doesn't have a length in bits which is a multiple of C. =back =head1 SEE ALSO Go to L for the majority of distribution-internal references, and L for the majority of distribution-external references. =head1 AUTHOR Darren Duncan (C) =head1 LICENSE AND COPYRIGHT This file is part of the formal specification of the Muldis D language. Muldis D is Copyright © 2002-2008, Darren Duncan. See the LICENSE AND COPYRIGHT of L for details. =head1 TRADEMARK POLICY The TRADEMARK POLICY in L applies to this file too. =head1 ACKNOWLEDGEMENTS The ACKNOWLEDGEMENTS in L apply to this file too. =cut