User Tools

Site Tools


built_in:load_number

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

built_in:load_number [2015/03/21 17:43]
madlyr [Description]
built_in:load_number [2016/08/03 13:46]
Line 1: Line 1:
-=====LoadNumber===== 
  
-//(Information and examples taken from the DroidScript documentation)// 
- 
-====Description==== 
- 
-The **LoadNumber** method loads and returns a numeric value from the user's storage space under **valueName**. If there is no stored **valueName**, then method returns **default** value. Use this method when saving and loading user preferences. 
- 
-The third parameter **id** is an optional text parameter and allows sharing of data across multiple Apps when the same id is used by both apps. 
- 
-<code> num = app.LoadNumber( valueName, default, id );</code> 
- 
-See also [[built_in:save_number|SaveNumber]] 
- 
----- 
- 
-====Example==== 
- 
-<code javascript> 
- 
-function OnStart() 
-{ 
-  num = app.LoadNumber( "MyNumber", 42 ); 
-  app.ShowPopup( num ); 
- 
-  app.SaveNumber( "MyNumber", num+1 ); 
- 
- 
-</code> 
built_in/load_number.txt ยท Last modified: 2016/08/03 13:46 (external edit)