﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1746	Inconsistent array access using indices	mburisch	mburisch	"Array access inside a function seems to be 0-based, whereas I think it should be 1-based. Furthermore it depends on wheter evaluation is during compile time (1-based) or runtime (0-based). Se the following example:

{{{
model Test2
  function func
    input Integer idx;
    output Integer value;
  protected
    constant Integer[4] values = {1, 2, 3, 4};
  algorithm
    value := values[idx];
  end func;

  parameter Integer idx = 1;
  parameter Integer p1 = func(1);    // = 1
  parameter Integer p2 = func(idx);  // = 2
end Test2;
}}}"	defect	closed	high	1.9.0	Code Generation		fixed		mburisch
