AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 30.08.2007, 04:41   #1  
Blog bot is offline
Blog bot
Участник
 
25,617 / 848 (80) +++++++
Регистрация: 28.10.2006
Issues concerning X++: Correction guide - Compiler warnings
Источник: http://blogs.msdn.com/x/archive/2007...-warnings.aspx
==============

The following is based on material kindly provided by Michael Fruergaard Pontoppidan. I have edited it substantially and added some new material to make it fit within the context of this blog.
Introduction

This guide will show you how to resolve compiler warnings in Axapta.
Compiler warnings are a strong indication that the code contains flaws or questionable constructs. The compiler groups the warnings in several levels according to the warning's severity: Level 1 is for very questionable issues, downto level 4 which are smaller issues. All compiler warnings must all be eliminated from production code to improve the overall code quality.
Note that the Dynamics Ax development environment also features a best practise framework that diagnoses the code's adherence to the established best practises. The diagnostics issued by this tool are not covered here. Contents

Introduction.
Compiler Warnings Level 1.
Break statement found outside legal context.
The new method of a derived class does not call super().
The new method of a derived class may not call super().
Function never returns a value.
Not all paths return a value.
Assignment/Comparison loses precision.
Compiler Warnings Level 2.
Unreachable code.
Compiler Warnings Level 3.
Empty compound statement.
Updating Views is not supported.
Compiler Warnings Level 4.
Class names should start with an uppercase letter.
Member names should start with a lowercase letter.
Compiler Warnings Level 1

Break statement found outside legal context

Break statements are used to skip to the end of for, while, do-while and switch statements. If a break statement is encountered outside the body of one of these statements it is ignored at runtime and should be removed from the code to avoid confusion and improve legibility.
Example

1: { 2: int i; 3: 4: for (i = 1; i
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
X++: Is the X++ Compiler Too Flexible? Blog bot DAX Blogs 17 03.03.2009 17:11
axStart: Why performance issues hits you’re AX implementation 3 months after going live. Blog bot DAX Blogs 0 05.03.2008 05:47
Issues concerning X++: Macros - Definitions and Pitfalls Blog bot DAX Blogs 0 15.11.2007 09:20
Dynamics AX: Microsoft Dynamics AX (DAX): Known Issues when upgrading to Microsoft Dynamics™ AX 4.0 - Arijit Basu | AX MVP Blog bot DAX Blogs 0 31.05.2007 03:30
Arijit Basu: Known Issues when upgrading to Microsoft Dynamics™ AX 4.0 Blog bot DAX Blogs 0 29.05.2007 15:10

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 15:14.