Swift: How can I use mutual dependencies, forward declarations?

Function A() calles function B() and function B() calls function A().

Some uses forward declarations like Pascal.

Swift needs to have those in the same line.

// -- Swift: get around mutual dependencies: Put code in the same line. Strange notation.

doMain(); func doMain()
{
    println("Hello from doMain!")
}

 

Helpful?

Kommentar verfassen

Ihre E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Warenkorb
Scroll to Top