mleafer
mleafer

Reputation: 865

How to comment out chunk of code in Pact?

How do I comment out a chunk of code in Pact? Is there a shortcut in Atom for this?

I have tried command+? but it comments it out in HTML format.

This does however work in Pact Web (pact.kadena.io)

Upvotes: 3

Views: 119

Answers (1)

topos
topos

Reputation: 96

Pact is a Lisp-like language and so makes use of Lisp-style comments using semicolons (but not block comments). For example, if you wanted to comment out some pact code, you could do the following

(my-module 'my-keys
  ;(hello-world-old:string (name:string)
  ;  ...)

  (hello-world-new:string (name:string)
    ...)
)

You can make use of semicolons in really expressive ways, which are detailed in this great post here: Lisp commenting convention

Cheers, and happy hacking!

Upvotes: 5

Related Questions