本文整理汇总了C#中SObject.isVector方法的典型用法代码示例。如果您正苦于以下问题:C# SObject.isVector方法的具体用法?C# SObject.isVector怎么用?C# SObject.isVector使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SObject
的用法示例。
在下文中一共展示了SObject.isVector方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: op3_procedure_set
public static SObject op3_procedure_set(SObject arg1, SObject arg2, SObject arg3) {
expect3(arg1.isProcedure(), arg1, arg2.isFixnum(), arg2, true, arg3,
Constants.EX_PROCEDURE_SET);
Procedure p = (Procedure) arg1;
int b = ((SFixnum)arg2).value;
// System.Console.WriteLine("** (procedure-set! {0} {1} {2})", arg1, arg2, arg3);
if (b == 0) {
// "code vector"
p.setCode(arg3);
return Factory.Unspecified;
} else if (b == 1) {
if (arg3.isVector()) {
p.setConstants((SVL)arg3);
return Factory.Unspecified;
} else {
Exn.fault(Constants.EX_PROCEDURE_SET, "not a vector", arg1, arg2, arg3);
return null;
}
} else if (b > 1) {
int bb = b - 2;
if (bb < p.rib.Length) {
p.rib[bb] = arg3;
return Factory.Unspecified;
}
}
Exn.fault(Constants.EX_PROCEDURE_SET, "procedure-set!: bad index " + b, arg1, arg2, arg3);
return null;
}
示例2: op3_vector_set
public static SObject op3_vector_set(SObject arg1, SObject arg2, SObject arg3) {
expect3(arg1.isVector(), arg1, arg2.isFixnum(), arg2, true, arg3, Constants.EX_VECTOR_SET);
rangeCheckVL(arg1, arg2, arg3, Constants.EX_VLSET);
((SVL)arg1).elements[((SFixnum)arg2).value] = arg3;
return Factory.Unspecified;
}
示例3: op1_vector_length
public static SObject op1_vector_length(SObject arg) {
expect1(arg.isVector(), arg, Constants.EX_VECTOR_LENGTH);
return Factory.makeFixnum(((SVL)arg).length());
}
示例4: op2_vector_ref
public static SObject op2_vector_ref(SObject arg1, SObject arg2) {
expect2(arg1.isVector(), arg1, arg2.isFixnum(), arg2, Constants.EX_VECTOR_REF);
rangeCheckVL(arg1, arg2, Constants.EX_VLREF);
return ((SVL)arg1).elements[((SFixnum)arg2).value];
}
示例5: op1_vectorp
public static SObject op1_vectorp(SObject arg) {
return Factory.makeBoolean(arg.isVector());
}