http://www.aros.orgAROS-ExecTeam AROSAROS-Exec Archives

Ínicio

English

Deutsch

Ελληυικά

Français

Italiano

Nederlands

Polski

Português

Русский

Español

Suomi

Svenska

Česky


Novidades

Arquivo

Introdução

Estado
Imagens
Portos
Licença

Descarregar


Documentação

Utilizadores
Instalação
Utilizando
Comandos de 'Shell'
Applications
F. A. Q.
Desenvolvidores
Contribuintes
Roadmap
À procura de erros...
Trabalhando com Subversão
Compilando
Manual de Desenvolvimento de Aplicações
Manual de Desenvolvimento de Aplicações Zune
Manual de Desenvolvimento do sistema
Manual de Correcção de erros
Referência
Especificações
Guia de Estilos I. U.
Documentando
Portando
Tranduzindo
Sumários
Ligações

Contactos

Listas de eCorreio
Canais de IRC

Créditos

A saber...


Fotografias

Desenvolvidores
Massa de desenvolvidores

Patrocínios

Ligando

Ligações

SourceForge Logo

If

Index Prev Next


Name

If

Synopsis

NOT/S,WARN/S,ERROR/S,FAIL/S,,EQ/K,GT/K,GE/K,VAL/S,EXISTS/K

Location

Workbench:C

Function

Carry out all the commands in a block if a given conditional is true.
(A block is a run of command lines ended with an Else or EndIf
command.) For every If command there must be a corresponding EndIf.
If the condition is false, command execution will skip to the
corresponding Else of EndIf command.

Inputs

NOT               --  Negates the value of the condition

WARN              --  True if the previous return code was greater
                      than or equal to 5.
ERROR             --  True if the previous return code was greater
                      than or equal to 10.
FAIL              --  True if the previous return code was greater
                      than or equal to 20.

EQ, GE, GT        --  True if the first value is equal, greater than
                      or equal respectively greater than the second.

VAL               --  Indicate that the comparison should treat the
                      strings as numerical values.

EXISTS  <string>  --  True if the file or directory <string> exists.

Example

If 500 GT 200 VAL
    echo "500 is greater than 200"
Else
    If EXISTS S:User-Startup
        echo "User-Startup script found in S:"
        Execute S:User-Startup
    EndIf
EndIf

Notes

ERROR and FAIL will only be appropriate if the fail level of the
script is set via FailAt (the standard fail level is 10 and if any
return code exceeds or equals this value, the script will be aborted).

Direitos de Cópia © 1995-2008, A Equipa de Desenvolvimento AROS. Todos Os Direitos Reservados.
Amiga®, AmigaOS®, Workbench e Intuition são marcas registadas de Amiga Inc. Todas as outras marcas comerciais pertencem aos seus respectivos proprietários.