/*
JSONScript VB6 script interpreter example
26/April/2009 by Mike Glaser
*/
// main program command array
[{
// Shows an alert with a cat's color based on a lookup
'alert': {
title: 'Cat Color: ',
message: [
// this is the command array that makes up the message text
{
// set the "snowycolor" variable to a user defined value
'set': {
name: 'snowycolor',
value: {
// get value in input box
'input': {
'title': 'Snowy the the cats\' color',
'prompt': 'What\'s Snowy\'s color:',
'default': 'White'
}
}
}
}, {
// check if value was "white", if so set var to "Whiter than Snow"
'set': {
name: 'snowycolor',
value: {
// if snowycolor = 'white' then return 'Whiter than Snow'
'if': {
'value1': {
'get': {
name: 'snowycolor'
}
},
'value2': 'White',
// types of compare: eq, gt, lt, gte, lte
'type': 'eq',
'true': 'Whiter than Snow',
'false': {
'get': {
name: 'snowycolor'
}
}
}
}
}
},
{
// lookup the cat's name
'switch': {
'case': {
'input': {
'title': 'Please Enter a cat name',
'prompt': 'Cat Name (Sly, Ebony, Karma, Snowy):',
'default': 'Snowy'
}
},
// default case
'default': 'Unknown Color',
// cases
items: [{
'case': 'Sly',
'return': 'Gray'
}, {
'case': 'Ebony',
'return': 'Black'
}, {
'case': 'Karma',
'return': 'Ginger'
}, {
'case': 'Snowy',
// example of string concatonation
'return': [' Snowy\'s Color is: ', {
'get': {
'name': 'snowycolor',
'default': 'None Given'
}
}]
}]
}
}]
// Program command array finished for 'message' variable, so now alert will display.
}
},
// This is the string to return to the command interpreter
'The Program Ran OK']
VB6 处理Json数据源码
4星 · 超过85%的资源 需积分: 46 69 浏览量
2014-06-27
11:39:08
上传
评论 3
收藏 32KB RAR 举报
carklote_Lee
- 粉丝: 12
- 资源: 7
最新资源
- 489163704589409DY_模拟器版_0002_A1.apk
- _storage_emulated_0_DCIM_ScreenRecorder_Screenrecorder-2024-05-01-12-06-52-766.mp4
- 充电桩行业系列报告:国内海外同频共振,政策需求双轮驱动
- LT8619C源码文件
- banker_algorithm.py
- AI驱动虚拟人产业升级,应用场景进一步拓展
- 简历-求职简历-word-文件-简历模版免费分享-应届生-高颜值简历模版-个人简历模版-简约大气-大学生在校生-求职-实习
- 完整vue+springboot的高校大学生创业管理系统
- 简历-求职简历-word-文件-简历模版免费分享-应届生-高颜值简历模版-个人简历模版-简约大气-大学生在校生-求职-实习
- 简历-求职简历-word-文件-简历模版免费分享-应届生-高颜值简历模版-个人简历模版-简约大气-大学生在校生-求职-实习
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
- 1
- 2
- 3
- 4
前往页