New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined identifier in .ozn file #55

AntonKhorev opened this Issue Oct 20, 2015 · 1 comment


None yet
2 participants

AntonKhorev commented Oct 20, 2015

set of int: OUTCOME = -1..1;
set of int: GAMEPOINTS = 0..3;
set of int: TOURPOINTS = 0..3;

var OUTCOME: outcome;

function var GAMEPOINTS: outcomeToPoints( var OUTCOME: o ) = o+1; % (1)
% function var 0..3: outcomeToPoints( var OUTCOME: o ) = o+1;

var TOURPOINTS: points = outcomeToPoints(outcome); % (2)
% var GAMEPOINTS: points = outcomeToPoints(outcome);

solve satisfy;

output [ show(points) ];

This code produces an error:

MiniZinc: type error: undefined identifier `GAMEPOINTS'

It works without errors if either of (1) or (2) lines is replaced with the commented out line nearby.

Tested with MiniZinc 2.0.8 on Windows.


This comment has been minimized.


guidotack commented Oct 21, 2015

Thanks. The fix for this will be part of the next release.

@guidotack guidotack closed this in 82c40cc Dec 6, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment