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

  • Learn WebAssembly
  • Mike Rourke
  • 139字
  • 2021-08-13 15:38:52

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.

主站蜘蛛池模板: 吉林市| 昭觉县| 吐鲁番市| 乌鲁木齐市| 元谋县| 含山县| 祁连县| 徐汇区| 洛浦县| 抚远县| 蓝田县| 汾阳市| 崇阳县| 嵩明县| 开江县| 民乐县| 米脂县| 疏附县| 文化| 诏安县| 元江| 安阳市| 灵山县| 定州市| 缙云县| 巴楚县| 娱乐| 宣化县| 靖边县| 广汉市| 沅江市| 明光市| 赤城县| 九寨沟县| 连州市| 瓦房店市| 盖州市| 富源县| 泰兴市| 长阳| 济阳县|