Précédent | Sommaire | Suivant

5.2 Pré-définitions

Vous pouvez utiliser ces prédéfinitions standards pour automatiquement ajouter l'heure de la compilation au titre des versions de développement, ajouter la date au numéro de version, etc.

5.2.1 ${__FILE__}

Nom du script courant.

5.2.2 ${__LINE__}

Numéro de ligne courant.

5.2.3 ${__DATE__}

Date, suivant les paramètres locaux prédéfinis.

5.2.4 ${__TIME__}

Heure, suivant les paramètres locaux prédéfinis.

5.2.5 ${__TIMESTAMP__}

Date & heure, suivant les paramètres locaux prédéfinis.

5.2.6 Variables Prédefinies Scope

Variables prédéfinies standard qui contiennent des informations sur la portion de code actuelle.

5.2.6.1 ${__GLOBAL__}

Défini dans le scope global

Section test

  !ifdef ${__GLOBAL__}
    !error "this shouldn't be here!"
  !endif

SectionEnd

Function test

  !ifdef ${__GLOBAL__}
    !error "this shouldn't be here!"
  !endif

FunctionEnd

PageEx instfiles

  !ifdef ${__GLOBAL__}
    !error "this shouldn't be here!"
  !endif

PageExEnd

5.2.6.2 ${__SECTION__}

Défini comme le nom de section, sans préfixe, dans le scope section.

!ifdef __SECTION__
  !error "this shouldn't be here!"
!endif

Section test

  !ifndef __SECTION__
    !error "missing predefine!"
  !endif

  !if ${__SECTION__} != test
    !error "wrong predefine value!"
  !endif

SectionEnd

Section !test

  !if ${__SECTION__} != test
    !error "wrong predefine value!"
  !endif

SectionEnd

Section un.test

  !if ${__SECTION__} != test
    !error "wrong predefine value!"
  !endif

SectionEnd

5.2.6.3 ${__FUNCTION__}

Défini comme le nom de fonction, sans préfixe, dans le scope function.

!ifdef __FUNCTION__
  !error "this shouldn't be here!"
!endif

Function test

  !ifndef __FUNCTION__
    !error "missing predefine!"
  !endif

  !if ${__FUNCTION__} != test
    !error "wrong predefine value!"
  !endif

FunctionEnd

Function un.test

  !if ${__FUNCTION__} != test
    !error "wrong predefine value!"
  !endif

FunctionEnd

5.2.6.4 ${__PAGEEX__}

Défini comme le type de page dans le scope PageEx.

!ifdef __PAGEEX__
  !error "this shouldn't be here!"
!endif

PageEx instfiles

  !ifndef __PAGEEX__
    !error "missing predefine!"
  !endif

  !if ${__PAGEEX__} != instfiles
    !error "wrong page type"
  !endif
PageExEnd

5.2.6.5 ${__UNINSTALL__}

Défini dans les scope section, function ou PageEx de la désinstallation.

!ifdef __UNINSTALL__
  !error "this shouldn't be here!"
!endif

Function test

  !ifdef __UNINSTALL__
    !error "this shouldn't be here!"
  !endif

FunctionEnd

Function un.test

  !ifndef __UNINSTALL__
    !error "missing predefine!"
  !endif

FunctionEnd

Précédent | Sommaire | Suivant


A propos | Contacts | Publicité | Info légales | © Todae 2006-2008

Sites partenaires : discount | avis rémunérés| sorties DVD | Winamp