本文整理汇总了C#中SObject.isVectorLike方法的典型用法代码示例。如果您正苦于以下问题:C# SObject.isVectorLike方法的具体用法?C# SObject.isVectorLike怎么用?C# SObject.isVectorLike使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SObject
的用法示例。
在下文中一共展示了SObject.isVectorLike方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: op3_vector_like_set
public static SObject op3_vector_like_set(SObject arg1, SObject arg2,
SObject arg3) {
expect2(arg1.isVectorLike(), arg1,
arg2.isFixnum(), arg2,
Constants.EX_VLSET);
rangeCheckVL(arg1, arg2, Constants.EX_VLSET);
((SVL)arg1).elements[((SFixnum)arg2).value] = arg3;
return Factory.Unspecified;
}
示例2: op2_vector_like_ref
public static SObject op2_vector_like_ref(SObject arg1, SObject arg2) {
expect2(arg1.isVectorLike(), arg1,
arg2.isFixnum(), arg2,
Constants.EX_VLREF);
rangeCheckVL(arg1, arg2, Constants.EX_VLREF);
return ((SVL)arg1).elements[((SFixnum)arg2).value];
}
示例3: op2_typetag_set
public static SObject op2_typetag_set(SObject arg1, SObject arg2) {
expect2(arg1.isVectorLike() || arg1.isByteVectorLike() || arg1.isProcedure(), arg1,
arg2.isFixnum(), arg2,
Constants.EX_TYPETAGSET);
if (arg1 is SVL) {
((SVL)arg1).tag = ((SFixnum)arg2).value;
} else if (arg1 is SByteVL) {
((SByteVL)arg1).tag = ((SFixnum)arg2).value;
} else if (arg1 is Procedure) {
((Procedure)arg1).tag = ((SFixnum)arg2).value;
}
return Factory.Unspecified;
}
示例4: op1_vector_like_length
/* VectorLike operations */
/* --------------------- */
public static SObject op1_vector_like_length(SObject arg) {
expect1(arg.isVectorLike(), arg, Constants.EX_VLLEN);
return Factory.makeFixnum(((SVL)arg).length());
}
示例5: op1_typetag
/* VectorLike and ByteVectorLike operations */
/* ---------------------------------------- */
public static SObject op1_typetag(SObject arg) {
expect1(arg.isVectorLike() || arg.isByteVectorLike() || arg.isProcedure(), arg,
Constants.EX_TYPETAG);
if (arg is SVL) {
return Factory.makeFixnum(((SVL)arg).tag);
} else if (arg is SByteVL) {
return Factory.makeFixnum(((SByteVL)arg).tag);
} else {
return Factory.makeFixnum(((Procedure)arg).tag);
}
}