Block Comments is an actively used design pattern. Comments that span multiple lines.

?Years Old
  • Have a question about Block Comments not answered here? Email me and let me know how I can help.
  • Read more about Block Comments

Languages without Block Comments include elixir, erlang, graphql-sdl, json

Languages with Block Comments include dart, dedukti, haskell, javascript, julia, lua, matlab, python, ruby, rust, sas

Example from dart:

/* a comment
 */

Example from dedukti:

(; This is a comment ;)

Example from julia:

#=
Comment block
=#

Example from lua:

--[[
print(10)         -- no action (comment)
--]]

Example from matlab:

%{
Comment block
%}

Example from python:

'''
This is a multiline
comment.
'''

Example from ruby:

=begin
This is a multiline comment and con spwan as many lines as you
like. But =begin and =end should come in the first line only.
=end

Example from rust:

// see: https://doc.rust-lang.org/reference/comments.html
/* a block comment */

Example from sas:

 /* For example 1 use: x=abc;
  for example 2 use: y=ghi; */

Last updated January 24th, 2020

Edit Block Comments on GitHub