Renesas H8S/2628 Informações Técnicas Página 99

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 98
73
4.8.3 Auto Indentation
When you press return in a standard editor the insertion cursor will move to the next line down, at the first
column (i.e. against the left hand side of a window). Auto Indentation is a feature which, when return is pressed,
places the insertion cursor on the next line (as before) but under the first non-white space character of the
previous line. This enables you to type neat C/C++ or assembler code faster as you don’t have to type leading
spaces or tabs yourself.
Figure 4.8 illustrates two examples. The first (i) shows the effect of pressing return when the auto indentation
feature is disabled - the insertion cursor returns to the left-hand side of the window on the next line. When the
line “int z=20” is typed, it is not aligned with the previous two lines. The second example (ii) shows the effect of
pressing return when auto indentation is enabled - the insertion cursor drops underneath the “i” of the previous
line. Now, when the line “int z=20” is typed, it is automatically aligned (i.e. automatically indented).
void myfunction(void)
{
int x=5;
int y=10;
int z=20;
void myfunction(void)
{
int x=5;
int y=10;
int z=20;
i) Auto Indentation Disabled ii) Auto Indentation Enabled
Figure 4.8: Effect of Auto Indentation
To enable/disable Auto Indentation:
1. Select [Tools->Options...]. The “Options” dialog will be displayed. Select the “Editor” tab (figure 4.7).
2. Set the “Enable auto indentation” check box accordingly.
3. Click “OK” for the setting of the auto indentation check box to take effect.
Vista de página 98
1 2 ... 94 95 96 97 98 99 100 101 102 103 104 ... 429 430

Comentários a estes Manuais

Sem comentários