官术网_书友最值得收藏!

Values, types, and instructions

Although detailed coverage of the Text Format section of the Core Specification is out of the scope of this text, it's worth demonstrating how some of the language concepts map to the corresponding Wat. The following diagram demonstrates these mappings in a sample Wat snippet. The C code that this was compiled from represents a function that takes a word as a parameter and returns the square root of the character count:

Wat example with language concept details

If you intend on writing or editing Wat, note that it supports block and line comments. The instructions are split up into blocks and consist of setting and getting memory associated with variables with valid types. You are able to control the flow of logic using if statements and loops are supported using the loop keyword.

主站蜘蛛池模板: 衡阳县| 谢通门县| 集安市| 浦东新区| 罗平县| 登封市| 新郑市| 灵石县| 平原县| 寿宁县| 咸丰县| 四川省| 阿勒泰市| 澜沧| 万盛区| 格尔木市| 镇巴县| 天长市| 贺兰县| 崇州市| 泾源县| 溧水县| 潮安县| 阿图什市| 嵩明县| 乌鲁木齐县| 资兴市| 浦县| 资溪县| 双牌县| 临澧县| 隆回县| 浦城县| 松江区| 贞丰县| 乐至县| 海原县| 扎囊县| 密山市| 南丹县| 长丰县|