%% Display Enumeration Values
% This example shows how to pass enumeration values to the readEnum function in the shrlibsample library. Load the library.

if not(libisloaded('shrlibsample'))
    addpath(fullfile(matlabroot,'extern','examples','shrlib'))
    loadlibrary('shrlibsample')
end

%
% In MATLAB, you can express an enumerated type as either the enumeration string or its equivalent numeric value. Call readEnum with a string argument.

calllib('shrlibsample','readEnum','en4')

%
% Call readEnum with the equivalent numeric argument. The Enum1 definition declares enumeration en4 equal to 4.

calllib('shrlibsample','readEnum',4)

%
% Copyright 2015 The MathWorks, Inc.