Diewuxi

Belive tomorrow will be better, love science and technology, support communication and understanding, always ready for thought turn.

Blog / engineering_technology / computer / programming / general / 对跨平台的理解

Blog


Article^ Parent

对跨平台的理解


Date: 2018-01-29 15:00:00
Description: 对跨平台的理解。
Keywords: 跨平台, 编译型, 解释型, 字节码
Category: engineering_technology/computer/programming/general
Tag: programming, compiler
Link: https://www.diewuxi.com/blog/article/62.html

用代码的方式描述计算机语言代码执行方式。

编译型高级语言

for os in oses
{
    binary = os.complier.convert(source);
    os.load(binary).run(argvs);
}
                        

解释型高级语言

for os in oses
{
    binary = os.interpreter;
    argvs.add(source);
    os.load(binary).run(argvs);
}
                        

解释型高级语言,字节码方式

for os in oses
{
    binary = os.interpreter;
    argvs.add(os.interpreter.convert(source));
    os.load(binary).run(argvs);
}
                        

如果用某种语言描述的非操作系统特有操作在不同操作系统上都能正确进行,那么称这种语言是跨平台的。

跨平台,是语言的跨平台,而不是源码的跨平台,虽然有时候源码也可以跨平台。

实现源码的跨平台是方便的。有了语言的跨平台,就容易实现源码的跨平台。源码确定了最终的操作,定义的操作能否正确执行或者能否执行还依赖于操作系统。操作系统没有的基本功能,跨平台语言编写的源码并不能增加它,但是各个操作系统都有的功能,跨平台语言编写的源代码就是跨平台的。

Last modified: 2018-01-29

Comments [0]

There is no comments now.

Write comment(* is necessary, and email is not shown to public)


Diewuxi 2017--2024