首 页 | 新 闻 | Symbian | Android| Windows Mobile | J2ME | 下载中心 | 游戏策划招聘与求职 | 购书指南 | 视频教程
您现在的位置: 开发视界 >> Symbian >> Symbian入门 >> 正文
S60 Python 编程指南——定义函数
作者:佚名    文章来源:转载    更新时间:2007-1-6 9:23:17

练习: 定义一个函数

*以下的示例展示了如何定义一个函数:

说明:


示例代码:
# Copyright (c) 2005 Jurgen Scheible
# defining a function
import appuifw
def afunction():
    data = appuifw.query(u"Type a word:", "text")
    appuifw.note(u"The typed word was: " +data, "info")
afunction()
代码说明:
# Copyright (c) 2005 Jurgen Scheible
# defining a simple function
import appuifw
# a function is definded with: def nameoffunction():
# be aware of the indentation! (4 x spacebar)
def afunction():
    data = appuifw.query(u"Type a word:", "text")
    appuifw.note(u"The typed word was: " +data, "info")
# a function is called with its name and brackets behind it
afunction()

相关文章:
在S60中、正常UIQ3中使用设备无关字体变斜的解决方案
S60 3rd下实现Video Call 与 VoIP Call
symbian学习的开始
Symbian 应用软件开发、测试与S60 平台安全常见问题问答
Symbian开发环境设置(Microsoft Visual Studio.Net 2003工具)已测试通过
S60 3rd版下,如何运行控制台程序?
Symbian OS 应用程序在手机上无法运行的种种原因
S60系列用户界面显示器规范
 

站点地图 | 加入收藏 | 联系站长 | 广告服务 |
QQ:280529124  Tel:0592-8271361 辽ICP备05021703号