User Tools

Site Tools


cn_description


www.kbasic.com_images_languageelements.jpg

特性

www.kbasic.com_images_symbol.jpg 100%兼容VB6和QBasic;支持VB.NET的语法、函数、类似的对象和类。是面向对象技术的强大和VB6的易学的结合体。
KBasic由如下程序构成:

  • 带界面设计工具的集成开发环境(IDE)
  • 编译器(KBC)
  • 解释器,内含GUI界面元件(VM)



特色概述

  • 跨平台,
    • 统一的API,省却记忆之苦、混淆之忧
    • 一次编写,编译可以运行在Windows、Mac OS X和Linux三个操作系统上的软件
  • OOP快速开发,提高效率。支持单继承、多继承,公开,支持公开/私有/保护属性
  • 极大兼容VB6,熟悉的语法和界面设计工具,减少切换开发环境的影响;同时提供工具自动转换VB项目
  • 易学易用、内置提示和语言参考随时可用
  • 货价比高,专业版仅需24.95欧元(折合35美元)
  • 内建内存管理
  • 丰富的用户界面控件
  • 内建支持数据库
  • VB那样所见所得、拖拽式的界面设计工具
  • 方便、快捷地浏览源代码
  • 自动完成函数、数据类型,无论他们是内建的还是用户自定义的(仅限专业版)
  • 方便的调试方法,源代码级别的调试器:单步、显式变量值
  • 丰富的文档,文档中的超链接方便您的使用。
  • 繁多的实例,KBasic提供很多中小规模的程序实例,便于您参考。
  • 语言细节:
    • 函数支持可选参数、命名参数(例如mySub(param1 := 23, param2 := 100))
    • 传统变量命名法(例如name$、n%)
    • 属性处理
    • 普通类型和用户自定义类型的变量、数组,都可以按引用传递给函数
    • 虚拟机自带垃圾回收功能。保护数据和数组
    • 现代的异常处理机制
    • 稳健、灵活的错误处理机制:Exception用于整个方法;Try-Catch用于一段代码。如果您喜欢VB的老式的On Error方式,我们一样为您提供。
  • KBasic不是一种语言,而是三种语言。通过如下的命令,您可以在这三种语言模式之间切换。

缺省使用如下的KBasic新语法:

  OPTION KBASIC
  这样使用老的VB6代码:
  OPTION OLDBASIC
  为了运行古老的BASIC(例如QBasic)代码,应该这样:
  OPTION VERYOLDBASIC
  同一个程序的不同模块,可以使用这三种不同的语言模式。


  • 开源,您可以在下面的源代码部分获得详细信息。

www.kbasic.com_images_opensource.jpg

KBasic实例

语法实例

www.kbasic.com_images_type.jpg www.kbasic.com_images_variable.jpg www.kbasic.com_images_array.jpg
www.kbasic.com_images_array.jpg www.kbasic.com_images_sub.jpg www.kbasic.com_images_exception.jpg
www.kbasic.com_images_function.jpg www.kbasic.com_images_class.jpg www.kbasic.com_images_constructor.jpg
www.kbasic.com_images_instancemethod.jpg www.kbasic.com_images_property.jpg www.kbasic.com_images_module.jpg
www.kbasic.com_images_global.jpg www.kbasic.com_images_instancevariable.jpg


  • 点击这里获得更多信息

KBasic内幕

  • 点击这里,查看KBasic的内幕。

常见问题回答

版权限制相关问题


Q: 如果我开发开源软件或者只为自己开发软件,我需要购买Qt版权吗?

A: 不需要


Q: 如果是商业、非开源软件呢?

A: 那您必须从www.trolltech.com购买版权。


Q: 我有多台计算机,我需要为每一台计算机买一份KBasic的版权吗?

A: 不需要


Q: 为什么KBasic不支持ActiveX控件?

A: 因为ActiveX只运行在Windows上,而KBasic是跨平台的开发语言。

VB.NET 和 KBasic

升级、不升级,这是一个问题。
                   —— VB6程序员

尽管微软吹嘘.NET多么好,但是VB.NET相对VB6的变动大了点,导致一些VB6程序员在是否升级的问题上犹豫不定,结果是一部分人转投C#队伍,一部分人死守VB6,一部分人因讨厌.net framework的臃肿而选择了其他的编程工具。 KBasic是这样的开发工具,它没有VB.NET的臃肿,保持了VB的易用,同时借鉴了VB.NET的一些思想,为您提供了熟悉的开发环境。更妙的是,您可以无需理解操作系统的差异,开发三个平台上的程序!

VB6 和 KBasic

大体来讲,二者是一致的

  • KBasic 100%语法兼容VB
  • KBasic的IDE和VB6类似,语法高亮、自动完成、内建帮助……;提供了类似的界面设计工具。
  • KBasic的控件和VB6等效(Form、CommandButton、TextBox等等)
  • KBasic丰富的对象,和VB6一致(如Application)
  • KBasic可以发布可执行文件,但是同时支持三个操作系统
  • KBasic支持多种数据库
  • KBasic不支持ActiveX
  • KBasic提供编写面向对象的程序的能力,但是您完全可以不使用面向对象的方法编程
  • 稳健、灵活的错误处理机制:Exception用于整个方法;Try-Catch用于一段代码。如果您喜欢VB的老式的On Error方式,我们一样为您提供。
  • Boolean类型在KBasic中是1个字节,VB6中是2个字节。Integer和Long在KBasic中分别是32和64比特,而VB6中分别是16和32比特。KBasic的Int16和Int32对应着VB6的Integer和Long。

源代码

KBasic的源代码由Bernd Noetscher版权所有(2000 - 2007)。

您可以在使用GPL2协议发布的开源软件中使用KBasic的IDE和VM的源代码。其他应用需要从KBasic Software公司购买版权。

如果您有兴趣使用KBasic Software非开源的GUI、VM的代码(即IDE、编辑器、toolbox、属性窗口、语法高亮编辑器、代码完成、书签、断点、源代码浏览器、内建帮助、自动生成帮助文件、项目窗口),请和我们联系。

如果您想获得一份机器可以识别的源代码(GUI和VM部分),只需要30欧元的媒介、运输费用即可。该部分的代码是GPL2版权。详情请联系KBasic Software。

KBASIC版权协议

Source codes of IDE and VM are licensed under the terms of GPL Version 2 as published by The Free Software Foundation. Additionally, IDE and VM are dual licensed under the following license, which covers also the KBasic compiler.

KBasic Software License Agreement For The Professional Edition Of KBasic Software Atelier

READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSE TERMS (COLLECTIVELY “AGREEMENT”) CAREFULLY BEFORE OPENING THE SOFTWARE MEDIA PACKAGE. BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU ARE ACCESSING THE SOFTWARE ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS BY SELECTING THE “ACCEPT” BUTTON AT THE END OF THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL THESE TERMS, PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND OR, IF THE SOFTWARE IS ACCESSED ELECTRONICALLY, SELECT THE “DECLINE” BUTTON AT THE END OF THIS AGREEMENT.

1. LICENSE TO USE. KBasic Software grants you a non-exclusive and non-transferable license for the internal use only of the accompanying software and documentation and any error corrections provided by KBasic Software (collectively “KBasic”), by the number of users and the class of computer hardware for which the corresponding fee has been paid.

2. RESTRICTIONS KBasic is confidential and copyrighted. Title to KBasic and all associated intellectual property rights is retained by KBasic Software. Except as specifically authorized in any Supplemental License Terms, you may not make copies of Software, other than a single copy of Software for archival purposes. Unless enforcement is prohibited by applicable law, you may not modify, decompile, or reverse engineer Software. You acknowledge that KBasic is not designed, licensed or intended for use in the design, construction, operation or maintenance of any nuclear facility. KBasic Software disclaims any express or implied warranty of fitness for such uses. No right, title or interest in or to any trademark, service mark, logo or trade name of KBasic Software is granted under this Agreement.

3. LIMITED WARRANTY. KBasic Software warrants to you that for a period of thirty (30) days from the date of purchase, as evidenced by a copy of the receipt, the media on which KBasic is furnished (if any) will be free of defects in materials and workmanship under normal use. Except for the foregoing, Software is provided “AS IS”. Your exclusive remedy and KBasic Software's entire liability under this limited warranty will be at KBasic Software's option to replace Software media or refund the fee paid for Software.

4. DISCLAIMER OF WARRANTY. UNLESS SPECIFIED IN THIS AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

5. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL KBasic Software BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO THE USE OF OR INABILITY TO USE KBasic, EVEN IF KBasic Software HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event will KBasic Software's liability to you, whether in contract, tort (including negligence), or otherwise, exceed the amount paid by you for KBasic under this Agreement. The foregoing limitations will apply even if the above stated warranty fails of its essential purpose.

6. Termination. This Agreement is effective until terminated. You may terminate this Agreement at any time by destroying all copies of KBasic. This Agreement will terminate immediately without notice from KBasic Software if you fail to comply with any provision of this Agreement. Upon Termination, you must destroy all copies of KBasic.

7. Governing Law. Any action related to this Agreement will be governed by German law and controlling German law. No choice of law rules of any jurisdiction will apply.

8. Severability. If any provision of this Agreement is held to be unenforceable, this Agreement will remain in effect with the provision omitted, unless omission would frustrate the intent of the parties, in which case this Agreement will immediately terminate.

9. Integration. This Agreement is the entire agreement between you and KBasic Software relating to its subject matter. It supersedes all prior or contemporaneous oral or written communications, proposals, representations and warranties and prevails over any conflicting or additional terms of any quote, order, acknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement. No modification of this Agreement will be binding, unless in writing and signed by an authorized representative of each party.

详情请咨询:KBasic Software

cn_description.txt · Last modified: 2013/04/09 22:57 (external edit)