VPL basic data and variables MSRDS First Beginner
VPL basic – data and variables MSRDS First Beginner Course – STEP 6 Young Joon Kim http: //www. helloapps. com
Topics • Procedure for VPL Programming • Data and variable activities • Defining variable • Reading variable • Displaying your name • Input data • Manipulate data with “Calculate” 2
VPL • Visual Programming Language – Easy programming tool for novices and students • Easy to start • Easy to learn • Easy to skill up – Draw logics – Provide intuitive and understandable flow – Applicable for most S/W development area 3
Procedure for VPL programming 4
Procedure for VPL programming • Step 1: Add activities or services Add activities Add services 5
Procedure for VPL programming • Step 2: Set values 6
Procedure for VPL programming • Step 3: Connect each activity or service Connect 7
Procedure for VPL programming • Step 4: Connect functions 8
Procedure for VPL programming • Step 5: Connect data for each item 9
Procedure for VPL programming • Step 6: Save and run a diagram 10
Procedure for VPL programming • Step 7: Check the result 11
Procedure for VPL programming • Check log data Log data 12
Procedure for VPL programming • Stop VPL running 13
Data and variable activities 14
Data and variable activities • Data activity – Define constant values – Can’t be modified • Variable activity – Keep the values – Can be modified 15
Adding “Data” activity • Double click “Data” activity or drag and drop • Select data type • Input data 3 Input default value 2 Select data type 1 Double-click 16
Adding “Variable” activity • Double click “Variable” activity or drag and drop Double-click 17
Defining variable 18
Defining variable • Click “…” icon Click icon 19
Defining variable • Add variable • Change name • Select variable type Change name Click 1 Select type Click 20 3 2
Defining variable • Assign value to the variable Connect 21
Defining variable • Select “Set. Value” item 22
Defining variable • Assigned value 23
Reading variable 24
Reading variable • Use “Calculate” activity Double-click 25
Reading variable • Connect “Variable” and “Calculate” activities Connect 26
Reading variable • Select “state” item from the list 27
Reading variable • Add “. ” • Select “a” item from the list 1 Add “. ” 2 28 Select “a”
Reading variable • Add a “Simple Dialog” service Double-click 29
Reading variable • Connect “Calculate” and “Simple Dialog” service 30
Reading variable • Select “Alert. Dialog” function 31
Reading variable • Select “value” item from the left list 32
Reading variable • Save and run diagram 33
Reading variable • Execution result 34
Displaying your name 35
Displaying your name • Prepare below diagrams 36
Displaying your name • Connect “Data” and “Calculate” activities 37
Displaying your name • Type below text in the “Calculate” box – “My name is “ + value 38
Displaying your name • Connect “Calculate” and “Simple Dialog” 39
Displaying your name • Select “Alert. Dialog” • Select “value” 40
Displaying your name • Save and run diagram 41
Displaying your name • Execution result 42
Input data 43
Input data • Add “Data” and set below text – “Input your name: “ • Add a “Hello. Apps Console” service 2 1 Double-click 3 Double-click 44
Input data • Connect “Data” and “Console” 2 • Select “Write” • Select “value” 1 3 45
Input data • Copy and paste “Hello. Apps. Console” service • Connect first “Console” and second “Console” service • Select “Read. Line” function 3 1 2 Copy first Console service 46
Input data • Copy and paste “Hello. Apps. Console” service • Connect second “Console” and third “Console” service • Select “Write. Line” function 3 4 2 1 Copy first Console service 47
Input data • Save and run diagram 48
Input data • Execution results Type your name 49
Manipulate data with “Calculate” 50
Manipulate data with “Calculate” • Add “Calculate” activity • Type “My name is “ + Add “Calculate” 1 2 51
Manipulate data with “Calculate” • Select “Value” from the list 52
Manipulate data with “Calculate” • Connect “Calculate” and “Console” 53
Manipulate data with “Calculate” • Select “Write. Line” function • Select “value” data 54
Manipulate data with “Calculate” • Save and run diagram 55
Manipulate data with “Calculate” • Execution results Type your name 56
- Slides: 56