SilverScreen Solid Modeler

Implementation Issues

Implementation Issues

Previous topic Next topic  

Implementation Issues

Previous topic Next topic JavaScript is required for the print function  

SilverCEllipse

 

Implementation Issues

 

 


Bugs and Limitations

r_point Incomplete array types (that is, array declarations with the first dimension missing) may be initialized only if they have static storage class -- the initialization 'completes' the declaration by providing the missing dimension. The implication is that all arrays with auto storage class (local and non-static) must have all their dimensions defined in their declarations.

 

r_point Enumerated types are not distinct; that is, if etype1 and etype2 are enumerated types, then variables of type etype1 and etype2 may be assigned values of any if int , etype1 or etype2 without complaint. This is contrary to the Standard.

 

r_point i[j[A]] is not handled correctly (for i , j integers, A an array or pointer).

 

r_point double (*tm)[4] cannot be handled correctly by the parser, nor any declaration with parentheses surrounding the identifier.

 

r_point Separate compilation of source files is not supported. The successful compilation of a single source file results in a single executable file -- no linking step is available. In order to simulate separate compilation, the #include facility may be used.

 

r_point Pointers to functions are not supported

 

r_point Bit fields are not supported

 

r_point unsigned integral quantities are not distinguished from signed

 

 


Compiler Limits and Defaults

 

r_pointmaximum length of a source line -- 320 characters (after trigraph processing)

 

r_pointlength of identifier distinguishable by compiler -- 20 characters

 

r_pointnumber of levels of #if nesting -- 12

 

r_pointnumber of levels of for , while , do nesting -- 10

 

r_pointmaximum length of a string -- 320 characters

 

r_pointmaximum size of parameter area for functions with a variable argument list: 128 bytes

 

r_pointthe default stack size is 10000 bytes

 

r_pointthe maximum number of dimensions on an array is 3; the maximum size of any of those dimensions is 1024

 

 


Extensions

r_pointA number of variables are predefined by the compiler, similar to the predefined library functions. See Predefined Variables on page 93. These variables may not appear as the target of an assignment statement, nor may their address be taken.

 

r_pointSilverC supports an intrinsic data type, struct _xyz , which is intended to hold 3D coordinates. Variables of this type receive special treatment when embedded in script commands. See XYZ Coordinates on page 35. The structure is defined as follows:

 

 

 struct _xyz

    {

    double x;

    double y;

    double z;

    };

 

 

r_pointIf the SilverC compiler encounters an '@'  character where it is expecting a statement, the compiler takes the remaining characters in the line to be an embedded SilverScreen script command. Such a command may include embedded C language expressions, provided that these expressions are enclosed with braces. At execution time, expressions are evaluated, inserted into the script command, and passed to the SilverScreen command processor. See Embedded Commands and Expressions on page 33.

 

r_pointThe compiler accepts C++ style comments: the characters '//' introduce a comment that extends to the end of the current source line.

 

r_pointA new format specifier has been added to the printf family (printf , fprintf , sprintf , ss_command , vsprintf , vprintf , vfprintf). If 'z' is used as the format specifier, a pointer to the predefined struct _xyz (SS_XYZ) is expected as an argument. The x , y and z components of the SS_XYZ will be converted into an ASCII sequence as if by if by use of "%.15g,%.15g,%.15g".

 

r_pointEmbedded flag characters, field widths, precision specifications or size specifications are ignored. Null argument sequences are now allowed in SilverC macros.

 

 

 


Restrictions

 
SilverC variables are significant to 20 characters. SilverScreen system variables are limited to eight characters in length, not including the preceding dollar sign ('$').

Features that are not supported:

 

r_pointpointers to functions

 

r_pointbit fields

 

r_pointextern variables

 

r_pointunsigned attribute

 

r_pointfloat data type

 

r_pointArrays may have a maximum of 3 dimensions, up to 1023 elements per dimension.

 

 


Data Types and Alignment

In SilverC, the sizes of the elementary data types are:

 

Data Type

Size

Alignment

char

1 byte

1

short

2 bytes

2

int

4 bytes

4

long

4 bytes

4

double

8 bytes

4

pointer

4 bytes

4

 

These sizes are independent of operating system and machine.

 

Structures are aligned according to data type, with padding inserted so that each elementary data type falls on its natural alignment boundary as shown above. In this manner, char is aligned to a 1-byte boundary, short to a 2-byte boundary, int to a 4-byte boundary, and so on.

The internal structures of SilverScreen are designed so that no padding takes place. This is to say that padding has been explicitly inserted into structures where the variables in the structure would otherwise not fall on their natural boundaries. This is the source of some of the unused variables that appear in these structures.