Commit 47a30d48 authored by ees1dw's avatar ees1dw

fixed yet another special case: if only one shape, no <type>Is<value>

parent dbd42c58
......@@ -480,7 +480,14 @@ static void consproc_body( d, s ) decln d; shape s;
line( "RETURN NIL;" );
} else if( ! d->Struct )
{
line( "RETURN %s( ORD(%sIs%s) );", d->name, d->name, s->name );
if( d->ManyShapes )
{
line( "RETURN %s( ORD(%sIs%s) );",
d->name, d->name, s->name );
} else
{
line( "RETURN %s( 0 );", d->name );
}
} else
{
line( "NEW( new );", d->name );
......@@ -650,8 +657,14 @@ static void writeproc_body( d ) decln d;
{
char tag[256];
sprintf( tag, "VAL(KindOf%s, this)", d->name );
write_using_case( tag, d->name, shapes );
if( d->ManyShapes )
{
sprintf( tag, "VAL(KindOf%s, this)", d->name );
write_using_case( tag, d->name, shapes );
} else
{
line( "WriteString( f, \"%s\" );", shapes->name );
}
}
if( d->UseNull )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment