MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / isStringArg

Method isStringArg

ij/src/main/java/ij/macro/Functions.java:2971–2985  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2969 }
2970
2971 boolean isStringArg() {
2972 int nextToken = pgm.code[interp.pc+1];
2973 int tok = nextToken&0xff;
2974 if (tok==STRING_CONSTANT||tok==STRING_FUNCTION) return true;
2975 if (tok==VARIABLE_FUNCTION && interp.isString(interp.pc+1)) return true;
2976 if (tok!=WORD) return false;
2977 Variable v = interp.lookupVariable(nextToken>>TOK_SHIFT);
2978 if (v==null) return false;
2979 int type = v.getType();
2980 if (type!=Variable.ARRAY)
2981 return v.getType()==Variable.STRING;
2982 Variable[] array = v.getArray();
2983 if (array.length==0 || interp.nextNextToken()=='.') return false;
2984 return array[0].getType()==Variable.STRING;
2985 }
2986
2987 void exit() {
2988 String msg = null;

Callers 15

setColorMethod · 0.95
randomMethod · 0.95
setResultMethod · 0.95
newArrayMethod · 0.95
makeSelectionMethod · 0.95
fromPlotMethod · 0.95
isOpenMethod · 0.95
openMethod · 0.95
selectImageMethod · 0.95
setBatchModeMethod · 0.95
setAutoThresholdMethod · 0.95
getImageArgMethod · 0.95

Calls 6

getTypeMethod · 0.95
getArrayMethod · 0.95
lookupVariableMethod · 0.80
nextNextTokenMethod · 0.80
getTypeMethod · 0.65
isStringMethod · 0.45

Tested by

no test coverage detected