From ccd383cbed939d4739ab607ba0314313f35ea87b Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Fri, 21 Aug 2015 16:44:55 +0200 Subject: [PATCH] fix array indexing for Julia --- preprocessor/ExprNode.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/preprocessor/ExprNode.hh b/preprocessor/ExprNode.hh index e979fb07b..ff793a394 100644 --- a/preprocessor/ExprNode.hh +++ b/preprocessor/ExprNode.hh @@ -103,9 +103,9 @@ enum ExprNodeOutputType || (output_type) == oLatexDynamicModel \ || (output_type) == oLatexDynamicSteadyStateOperator) -/* Equal to 1 for Matlab langage, or to 0 for C language. Not defined for LaTeX. - In Matlab, array indexes begin at 1, while they begin at 0 in C */ -#define ARRAY_SUBSCRIPT_OFFSET(output_type) ((int) IS_MATLAB(output_type)) +/* Equal to 1 for Matlab langage or Julia, or to 0 for C language. Not defined for LaTeX. + In Matlab and Julia, array indexes begin at 1, while they begin at 0 in C */ +#define ARRAY_SUBSCRIPT_OFFSET(output_type) ((int) (IS_MATLAB(output_type) || IS_JULIA(output_type))) // Left and right array subscript delimiters: '(' and ')' for Matlab, '[' and ']' for C #define LEFT_ARRAY_SUBSCRIPT(output_type) (IS_MATLAB(output_type) ? '(' : '[')