asInt() public méthode

public asInt ( ) : int
Résultat int
Exemple #1
0
        public static IoObject slotAt(IoObject target, IoObject locals, IoObject message)
        {
            IoMessage m   = message as IoMessage;
            IoNumber  ind = m.localsNumberArgAt(locals, 0);
            IoList    o   = target as IoList;
            IoObject  v   = o.list[ind.asInt()] as IoObject;

            return(v == null ? target.state.ioNil : v);
        }
Exemple #2
0
        public static IoObject slotAt(IoObject target, IoObject locals, IoObject message)
        {
            IoMessage m   = message as IoMessage;
            IoSeq     o   = target as IoSeq;
            IoSeq     res = IoSeq.createObject(target.state);
            IoNumber  arg = m.localsNumberArgAt(locals, 0);

            res.value += o.value.Substring(arg.asInt(), 1);
            return(res);
        }
Exemple #3
0
        public static IoObject slotRemoveAt(IoObject target, IoObject locals, IoObject message)
        {
            IoMessage m   = message as IoMessage;
            IoNumber  ind = m.localsNumberArgAt(locals, 0);
            IoList    o   = target as IoList;

            try
            {
                o.list.RemoveAt(ind.asInt());
                return(target);
            }
            catch (ArgumentOutOfRangeException aoore)
            {
                object ex = aoore;
                return(target.state.ioNil);
            }
        }