Main Content

getMacro

Class: coder.make.ToolchainInfo
Package: coder.make

Get value of macro

Syntax

value = h.getMacro(macroname)

Description

value = h.getMacro(macroname) returns the value of the specified macro.

Input Arguments

expand all

A coder.make.ToolchainInfo object, specified using an object handle, such as h. To create h, enter h = coder.make.ToolchainInfo in a MATLAB® Command Window.

Name of macro.

Output Arguments

expand all

Value of the macro, specified as a character vector, string scalar, or cell array.

If the value contains MATLAB functions or other macros, ToolchainInfo interprets the value of functions and macros.

Data Types: cell | char | string

Examples

h.setMacro('CYGWIN','C:\cygwin\');
h.getMacro('CYGWIN')
ans  = 

C:\cygwin\bin\

h.removeMacro('CYGWIN')