Portal-Zone Gothic-Zone Gothic II-Zone Gothic 3-Zone Gothic 4-Zone Modifikationen-Zone Download-Zone Foren-Zone RPG-Zone Almanach-Zone Spirit of Gothic

 

Ergebnis 1 bis 3 von 3
  1. Beiträge anzeigen #1 Zitieren
    Warrior Avatar von Czudak
    Registriert seit
    Sep 2015
    Beiträge
    415
     
    Czudak ist offline

    [GIINotR; scripts] The void function and the "empty return"

    Hi.

    I'm failing to understand what return; (without any determined argument) is used for in the void function. Does it return the last used value (TRUE/FALSE or 0/1) in the function's chain or is it a return for a return's sake, so the function could fire up, or what?

    If anyone could clarify, I would appreciate it. Thank you in advance.

  2. Beiträge anzeigen #2 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.410
     
    NicoDE ist offline
    Since a void function does not return a value, return just leaves the current function (without executing the code that follows) and returns control to the caller.
    "Unter diesen schwierigen Umständen bin ich mir sicher, daß diese guten Menschen meinen augenblicklichen Bedarf an deren Gold verstehen werden." -- Connor

  3. Beiträge anzeigen #3 Zitieren
    Warrior Avatar von Czudak
    Registriert seit
    Sep 2015
    Beiträge
    415
     
    Czudak ist offline
    Zitat Zitat von NicoDE Beitrag anzeigen
    Since a void function does not return a value, return just leaves the current function (without executing the code that follows) and returns control to the caller.
    Now that explains a lot of things since I wondered why the rest of a function wasn't executed in several of those Gothic's AI spell scripts. Thanks!

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
Impressum | Link Us | intern
World of Gothic © by World of Gothic Team
Gothic, Gothic 2 & Gothic 3 are © by Piranha Bytes & Egmont Interactive & JoWooD Productions AG, all rights reserved worldwide