Branch: Tag:

2004-10-30

2004-10-30 11:39:21 by Martin Stjernholm <mast@lysator.liu.se>

Implemented from-the-end indexing in ranges using the a[..<1] syntax. Added
[..]. Still to do: Avoid fallback to [] for ranges if it doesn't take two
args.

Rev: lib/modules/Pike.pmod/module.pmod:1.12

3:      // Pike core things that don't belong anywhere else.   // - // $Id: module.pmod,v 1.11 2004/07/04 12:38:50 mast Exp $ + // $Id: module.pmod,v 1.12 2004/10/30 11:39:21 mast Exp $      constant WEAK_INDICES = __builtin.PIKE_WEAK_INDICES;   constant WEAK_VALUES = __builtin.PIKE_WEAK_VALUES;
11:   //! Flags for use together with @[set_weak_flag] and @[get_weak_flag].   //! See @[set_weak_flag] for details.    + constant INDEX_FROM_BEG = __builtin.INDEX_FROM_BEG; + constant INDEX_FROM_END = __builtin.INDEX_FROM_END; + constant OPEN_BOUND = __builtin.OPEN_BOUND; + //! Used with @[predef::`[..]] and @[lfun::`[..]] to specify how the + //! corresponding index maps to an upper or lower range bound: + //! + //! @dl + //! @item INDEX_FROM_BEG + //! The index is relative to the beginning of the string or array + //! (or any other sequence implemented through an object). + //! Sequences typically start at zero. + //! + //! @item INDEX_FROM_END + //! The index is relative to the end of the sequence. In strings + //! and arrays, the last element is at zero, the one before that + //! at one, etc. + //! + //! @item OPEN_BOUND + //! The range is open in the corresponding direction. The index is + //! irrelevant in this case. + //! @enddl +    constant BacktraceFrame = __builtin.backtrace_frame;      constant Backend = __builtin.Backend;