正在加载图片...
Examples of the things we check in the semantic analysis phase The type of the right-side expression of an assignment statement should match the type of the left-side, and the left-side needs to be a properly declared and assignable identifier (i.e. not some sort of constant) The parameters of a function should match the arguments of a function call in both number and type The language may require that identifiers are unique disallowing a global variable and function of the same name The operands to multiplication operation will need to be of numeric type, perhaps even the exact same type depending on the strictness of the languageExamples of the things we check in the semantic analysis phase. . The type of the right-side expression of an assignment statement should match the type of the left-side, and the left-side needs to be a properly declared and assignable identifier (i.e. not some sort of constant). The parameters of a function should match the arguments of a function call in both number and type. The language may require that identifiers are unique, disallowing a global variable and function of the same name. The operands to multiplication operation will need to be of numeric type, perhaps even the exact same type depending on the strictness of the language
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有