Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to touchdevelop actions aka methods/functions/procedures Disclaimer: This document is provided “as-is”. Information and views expressed in.

Similar presentations


Presentation on theme: "Introduction to touchdevelop actions aka methods/functions/procedures Disclaimer: This document is provided “as-is”. Information and views expressed in."— Presentation transcript:

1 introduction to touchdevelop actions aka methods/functions/procedures Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it. This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes. © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and Windows Live are trademarks of the Microsoft group of companies. All other trademarks are property of their respective owners.

2 introduction to touchdevelop action properties o either select entire action and tap edit o or select properties at the bottom

3 introduction to touchdevelop name, private o multiple pages of properties o change name o toggle private (private actions cannot be called directly by the end- user, but only by other actions

4 introduction to touchdevelop parameters o remove parameter o add parameter change name change type

5 introduction to touchdevelop returns o just like parameters o multiple return values possible o assign each in action, just like local variables o it is an error if there is a path where return value is not assigned

6 introduction to touchdevelop initial values o parameters get initial value from calling context o returns are initially ‘invalid’

7 introduction to touchdevelop running o from script editor, you can directly run non-private actions if they have no type-checking errors if action requires parameters, a user-interface will be generated to input values If action returns value, it is posted to the wall when action returns

8 introduction to touchdevelop exercise ► implement the following recursive functions: factorial sum of 0 + 1 + … + N product of 1 * 2 * … * N

9 introduction to touchdevelop title o item 1 o Item 2 song→post to wall ☀ anecdote ☁ http://touchdevelop.com/velk (link to sample)http://touchdevelop.com/velk ► an exercise ✿ a reference


Download ppt "Introduction to touchdevelop actions aka methods/functions/procedures Disclaimer: This document is provided “as-is”. Information and views expressed in."

Similar presentations


Ads by Google