Skip to content

Commit

Permalink
[Hello World]: Added comment to stub and Instruction Append (#78)
Browse files Browse the repository at this point in the history
* Modified stub code and added instruction append. See forum post 7961 for more details.

* Update exercises/practice/hello-world/.meta/instructions.append.md

Corrected Web Assembly --> WebAssembly per code review comment.

* Update exercises/practice/hello-world/.meta/instructions.append.md

Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>

---------

Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
  • Loading branch information
BethanyG and ErikSchierboom committed Oct 31, 2023
1 parent 894d7ba commit f73bd84
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions exercises/practice/hello-world/.meta/instructions.append.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Instructions append

~~~~exercism/caution
Unlike most “Hello World” exercises on Exercism, WebAssembly requires an extra change to the code you are provided with in the start file.
As well as changing the string itself, you must also change the **length of the greeting** in the function definition.
See the comment in the starter code for more details.
~~~~
1 change: 1 addition & 0 deletions exercises/practice/hello-world/hello-world.wat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
(data (i32.const 64) "Goodbye, Mars!")

;; Returns the base offset and length of the greeting
;; The final number (currently “14”) must match the length of the new string.
(func (export "hello") (result i32 i32)
(i32.const 64) (i32.const 14)
)
Expand Down

0 comments on commit f73bd84

Please sign in to comment.