是否有一种编程语言采用缩进作为包含标记? (如果是的话,是哪一个)
我想知道编程语言是否使用这样的语法(请注意,从 C# 借用),即用于包含的选项卡,没有任何“End”指令。
class Character
static string Name;
static int Level;
static Inventory Inventory;
static double Health;
Character(string name, int level)
this.Name = name;
this.Level = level;
this.Inventory = new Inventory(this);
this.Health = 1;
void Die()
this.Health = 0;
class Inventory
Character Parent;
List<Item> Items;
Inventory(Character parent)
this.Parent = parent;
I'm wondering if such a syntax (borrowed from C#, mind you) is used by a programming language, i.e., tabs for containment, without any "End" directive.
class Character
static string Name;
static int Level;
static Inventory Inventory;
static double Health;
Character(string name, int level)
this.Name = name;
this.Level = level;
this.Inventory = new Inventory(this);
this.Health = 1;
void Die()
this.Health = 0;
class Inventory
Character Parent;
List<Item> Items;
Inventory(Character parent)
this.Parent = parent;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这些是我所知道的。
These are the ones I know of.
我知道的是Python。不确定周围是否还有其他人。
One I know if is Python. Not sure if there are others around.
Python。
Python.