Skip to content

Commit

Permalink
DIRECTOR: Lingo: Support string Datum printing
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Aug 3, 2016
1 parent 4763228 commit 598be95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion engines/director/director.cpp
Expand Up @@ -127,7 +127,8 @@ Common::Error DirectorEngine::run() {
if x = 4 then put 4\n\
else put 5\n\
end repeat\n\
set z = \"foo\"\n\
set z = \"foo bar baz\"\n\
put z\n\
", kMovieScript, 2);

_lingo->executeScript(kMovieScript, 2);
Expand Down
5 changes: 4 additions & 1 deletion engines/director/lingo/lingo-code.cpp
Expand Up @@ -92,6 +92,9 @@ void Lingo::c_printtop(void) {
warning("Nameless var. val: %d", d.u.sym->u.val);
}
break;
case STRING:
warning("%s", d.u.s->c_str());
break;
default:
warning("--unknown--");
}
Expand Down Expand Up @@ -169,7 +172,7 @@ void Lingo::c_assign() {
}

bool Lingo::verify(Symbol *s) {
if (s->type != INT && s->type != VOID && s->type != FLOAT) {
if (s->type != INT && s->type != VOID && s->type != FLOAT && s->type != STRING) {
warning("attempt to evaluate non-variable '%s'", s->name);

return false;
Expand Down

0 comments on commit 598be95

Please sign in to comment.