diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-07-25 14:19:28 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-07-25 17:14:58 -0700 |
commit | e46306432ddb75a89f69d92ccc175a23f0b72072 (patch) | |
tree | 48ed3828064f29cefaf14e3fe61d7dc02cac0e80 /047global.cc | |
parent | e83602d3917eba137cd8fb37605076fff5a746b1 (diff) | |
download | mu-e46306432ddb75a89f69d92ccc175a23f0b72072.tar.gz |
1848 - core instructions now check for ingredients
Also standardized warnings.
Diffstat (limited to '047global.cc')
-rw-r--r-- | 047global.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/047global.cc b/047global.cc index 6ce4b78f..39be9bc2 100644 --- a/047global.cc +++ b/047global.cc @@ -31,7 +31,8 @@ long long int global_space; global_space = 0; :(after "void write_memory(reagent x, vector<double> data)") if (x.name == "global-space") { - assert(scalar(data)); + if (!scalar(data)) + raise << current_recipe_name() << ": 'global-space' should be of type address:array:location, but tried to write " << to_string(data) << '\n' << end(); if (Current_routine->global_space) raise << "routine already has a global-space; you can't over-write your globals" << end(); Current_routine->global_space = data.at(0); @@ -66,7 +67,6 @@ $warn: 0 :(code) bool is_global(const reagent& x) { -//? cerr << x.to_string() << '\n'; //? 1 for (long long int i = /*skip name:type*/1; i < SIZE(x.properties); ++i) { if (x.properties.at(i).first == "space") return !x.properties.at(i).second.empty() && x.properties.at(i).second.at(0) == "global"; |