REQUIRE

From MusiCAD
Revision as of 12:59, 5 October 2023 by Musys (talk | contribs) (Created page with "'''REQUIRE''' is a template function that you can use in a layout template to ensure that further template functions are executed only under a certain condition. If the required condition is not met, further template functions will not be executed. However, any following ''settings'' will be applied. ''Syntax:'' REQUIRE( condition, notification ); With condition settings (e.g. note size) and variables...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

REQUIRE is a template function that you can use in a layout template to ensure that further template functions are executed only under a certain condition. If the required condition is not met, further template functions will not be executed. However, any following settings will be applied.

Syntax:

   REQUIRE( condition, notification );

With condition settings (e.g. note size) and variables (such as number of pages) can be 'queried' in MusiCAD.

Examples

  REQUIRE( sMeter=6/8, "Only possible if time signature is 6/8" );
  REQUIRE( fChords.size>7, "size of chord symbols must be greater than 7" );