多維數組可以降維使用,例如三維數組:3D[0..2,0..3,0..4]of Int是一個3×4×5大小的Int數組,3D[0]是一個4×5大小的二維Int數組,3D[0,1]是一個5個元素的一維Int數組,當然多維數組下標也可以換成變量,例如3D[Tag_1,1]這種;S7-1200 V4.2開始,多重背景支持數組形式,即Array of FB,這樣可以在FB中使用循環指令更方便的編寫程序
MATLAB% array of integersarray = [1 2 3 4 5 6 2 4 2]% find() will get the index of element% store it in the indexindex = find(array==2,2,'last')輸出: [行,列] = 查找(x)要在 3 維數組中查找元素的索引