```
OpCapability Shader
OpMemoryModel Logical Simple
-OpEntryPoint GLCompute $3 "main"
-OpExecutionMode $3 LocalSize 64 64 1
+OpEntryPoint GLCompute %3 "main"
+OpExecutionMode %3 LocalSize 64 64 1
OpTypeVoid %1
-OpTypeFunction %2 $1
-OpFunction $1 %3 None $2
+OpTypeFunction %2 %1
+OpFunction %1 %3 None %2
OpLabel %4
OpReturn
OpFunctionEnd
```
+In order to improve the text's readability, the `<result-id>` generated by an
+instruction can be moved to the beginning of that instruction and followed by
+an `=` sign. This allows us to distinguish between variable defs and uses and
+locate variable defs more easily. So, the above example can also be written as:
+
+```
+ OpCapability Shader
+ OpMemoryModel Logical Simple
+ OpEntryPoint GLCompute %3 "main"
+ OpExecutionMode %3 LocalSize 64 64 1
+%1 = OpTypeVoid
+%2 = OpTypeFunction %1
+%3 = OpFunction %1 None %2
+%4 = OpLabel
+ OpReturn
+ OpFunctionEnd
+```
+
Each line encapsulates one and only one instruction, or an OpCode and all of its
operands. OpCodes use the names provided in section 3.28 Instructions of the
SPIR-V specification, immediate values such as Addressing Model, Memory Model,
##### ID Definitions & Usage
-An ID definition pertains to the `Result <id>` of an OpCode, and ID usage is any
-input to an OpCode. To differentiate between definitions and uses, all ID
-definitions are prefixed with `%` and take the form `%<id>`, meanwhile all ID
-uses are prefixed with `$` and take the form `$<id>`. See the above example to
-see this in action.
+An ID definition pertains to the `<result-id>` of an OpCode, and ID usage is any
+input to an OpCode. All IDs are prefixed with `%`. To differentiate between
+defs and uses, we suggest using the second format shown in the above.
##### Named IDs
following example will result in identical SPIR-V binary as the example above.
```
-OpCapability Shader
-OpMemoryModel Logical Simple
-OpEntryPoint GLCompute $main "main"
-OpExecutionMode $main LocalSize 64 64 1
-OpTypeVoid %void
-OpTypeFunction %fnMain $void
-OpFunction $void %main None $fnMain
-OpLabel %lbMain
-OpReturn
-OpFunctionEnd
+ OpCapability Shader
+ OpMemoryModel Logical Simple
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 64 64 1
+ %void = OpTypeVoid
+%fnMain = OpTypeFunction %void
+ %main = OpFunction %void None %fnMain
+%lbMain = OpLabel
+ OpReturn
+ OpFunctionEnd
```
##### Arbitrary Integers