FilterFactory - Function "get"

Back to function listing

Returns the current cell value at i

Syntax

get(i)

Original Machine Code (in OPER resource) of Filter Factory 3.0 and 3.0.4 for Photoshop/Win32

58 pop eax (param_i) .
0B C0 or eax,eax .
7C 0E jl +$0e (@@1) if (param_i <   0) goto @@1; // return param_i
3D FF 00 00 00 cmp eax,$000000ff (255) .
7F 07 jnle +$07 (@@1) if (param_i > 255) goto @@1; // return param_i
8B 84 87 78 35 00 00 mov eax,[edi+eax*4+$00003578 (cell)] param_i = cell[param_i];
@@1: @@1:
50 push eax return param_i;

Implementation detail: If i is out of range (<0 or >255), the result is i (actually, undefined behavior). On Macintosh, the result is always 0 if i is out of range.