• Waqar Malik


A subroutine is a block of code that performs a specific task. Another name for a subroutine is a function. You’ve already seen global functions, such as println and print. Methods are functions that are associated with a particular type. In Swift, methods can be associated with classes, structures, and enumeration types. There are two types of methods: instance methods and type methods.


Specific Task Type Method Global Function Specific Instance Enumeration Type 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Waqar Malik 2015

Authors and Affiliations

  • Waqar Malik
    • 1
  1. 1.CAUnited States

Personalised recommendations