PLDB
Languages Features Calendar About Lists Add Language
GitHub icon

Line Comments

Line Comments

Line Comments are a language feature.

Comments that start with a character and continue until end of line.

Languages without Line Comments include HTML, XML, JSON, CSS, Mathematica, Pascal, OCaml, Smalltalk, Regular Expressions, Modula-2, Standard ML, Rexx, SPSS, Markdown, Modula-3, SVG, XQuery, ML, Wolfram Language, OWL, Object Pascal

Languages with Line Comments include Java, JavaScript, C, Python, C++, SQL, PHP, Ruby, R, Go, Perl, C#, Scala, MATLAB, Swift, MySQL, Rust, Haskell, Fortran, Lua, TypeScript, Scheme, Objective-C, COBOL, Clojure, PostgreSQL, SAS, Visual Basic, Erlang, ARM, Kotlin, Prolog, Julia, Elixir, Ada, PowerShell, Tcl, Dart, Groovy, F#, CoffeeScript, Common Lisp, Bash, D, Solidity, Crystal, Racket, Nim, BASIC, APL, Delphi, Chapel, Forth, Elm, Verilog, awk, Eiffel, Reason, PostScript, Haxe, Maple, YAML, GNU Octave, LaTeX, Emacs Lisp, fish, GraphQL, Dylan, Tex, VHDL, REBOL, LLVM IR, MUMPS, Idris, Red, PureScript, Pug, Simula, PL/SQL, Zig, Applescript, Vala, BCPL, WebAssembly, ANTLR, ClojureScript, Io, Visual Basic .NET, Deno, Rust MIR, HAML, Hy, Wren, Oz, MIPS architecture, J, VBScript, Logo, Ballerina, SNOBOL, Boo, ActionScript, Hack, TOML, Yacc, V, Protocol Buffers, Sage, CIL, OpenCL, AMPL, HCL, MoonScript, Pike, AutoIt, Fantom, Icon, VBA, SPARQL, QBasic, Stata, SuperCollider, Agda, Perl 6, Scilab, Falcon, Seed7, sed, Nemerle, Ceylon, Squirrel, JSON5, PEG.js, Cap'n Proto, Makefile, Xojo, X10, Bison, FLUX, Processing, Mercury, Batchfile, ABAP, Clean, Koka, Lasso, Eve, NewLisp, PureBasic, xBase, E, Terra, Zephir, Dafny, Frege, Java Bytecode, DOT, Smali, K, KaTeX, UNLAMBDA, Guile, API Blueprint, SETL, Lean, Nginx, PRQL, ATS, LFE, AutoHotkey, Modelica, SystemVerilog, Clipper, Monkey, M4, Turing, Bicep, Ini, x86 Assembly, LiveScript, Nearley, Less, Pig Latin, Datalog, Csound, LiveCode, Hjson, PicoLisp, unison, halide, carp, JCL, NetLogo, Sather, Transact-SQL, LPC, Flow, CIL, JAI, YASnippet, odin, CLIPS, WDL, Unicon, wisp, Pony, muPad, AspectJ, HOPE, Gosu, BETA, FoxPRO, CWL, TLA, AGC, Fennel, QML, Lex, Cg, LilyPond, Objective-J, Classroom Object Oriented Language, SIL, Cryptol, PEG, NSIS, Dhall, Nit, Futhark, Observable, Euphoria, Cue, idyll, Felix, JADE, Alloy, Dc, Click, Mu, S-algol, PowerBuilder, Ring, Fancy, GLSL, datascript, Flow9, OpenSCAD, mgmt, PL/pgSQL, Java Properties, Tea, Refal, Ch, starlark, Logica, eC, BlitzBasic, NCAR Command Language, P4, Expect, Netwide Assembler, IGOR Pro, ArkScript, QB64, Angelscript, Filebench WML, Whiley, PAWN, Cypher Query Language, Aldor, DAX, SugarSS, MiniD, Apex, Gettext Catalog, Not Quite C, Action!, KiXtart, SCSS, mlir, GAP, Ragel, Ron, Golo, Volt, Augmented Backus-Naur Form, Concise Encoding, Parser 3, Pan, spry, lispyscript, clay, Dockerfile, CIR, JSL, Spatial, BlitzMax, OpenVera, Ligo, PowerQuery M, MQL5, Argdown, OX, HLSL, mun-lang, Ren'Py, SourcePawn, Ezhil, Mask, ECL, True BASIC, Harbour, popr, DM, GDScript, Frink, Cell, Gentoo Ebuild, Hocon, Mary, Vigil, Jasmin, Shen, JSON with Comments, Linden Scripting Language, Script.NET, XBase++, OCL, PowerBASIC, Strips, HiveQL, Game Maker Language, Objective C++, C shell, KRL, Rescript, EuLisp, S-PLUS, Not eXactly C, Ion, NetLinx, Opal, Praat Script, dex, Gherkin, Eclipse Command Language, Logos, Spin, Mouse, Q#, Structured Query Reporter, BitBake, storyscript, NestedText, PIC, Cycript, LookML, SMT, POV-Ray SDL, Charity, Sophia, Quaint, c3, Xbasic, Amazon Redshift, Raku, Jsonnet, parasail, Rc, BLISS, Bel, Fable, CLOS, NS Basic, FutureBASIC, spiral, neut, RELAX NG, Embedded Crystal, LoomScript, Slice, Type Language, manool, Yoix, Judoscript, Project Mentat, carth, beads-lang, Ren, Zimpl, Z, JSLT, Tuple space, Vale, ThinBasic, Redcode, Adventure Game Studio Script, CartoCSS, SRecode Template, ldpl, pointless, gentee, kai, winxed, SimCode, Language Server Index Format, owen-lang, Claro, dlvm, Lexon, Reia, Sweet Expressions, Caché Basic, FML, Literate Agda, Module Management System, Reactive Plan Language, Soy, Yedalog, VHDL-AMS, MVEL, Turbo Basic, XBLite, WxBasic, HuJSON, Grammatical Framework, Alpine Abuild, GCC Machine Description, Brightscript, ShaderLab, Nymph, tht, Fjölnir, Lite-C, silk, Heron, taf, z80, BuddyScript, ISETL, Pawn, Recfiles, fizz, Guix Workflow Language, omega, Plot, PromQL, rosette-lang, verifpal, Finite State Language, holyc, rbs, Robots.txt, SubX, Maya Embedded Language, FloScript, Wart, Yet Another Scripting Language, PROMAL, OEM, neeilang, hilvl, boa, epsilon, flagship, lain, stella, GraphQL Schema Definition Language, StruQL, turnstile, xxl, CFScript, StarOffice Basic, Savi, Easytrieve, ActiveVFP, OptimJ, Pnuts, Action Code Script, MACRO-10, Operational Control Language, Treelang, AmbientTalk, atomese, Bla, Boogie, luau, USD, wescheme, ca65 Assembly, ctalk-lang, dslx, Portable Bit Map Format, Netpbm grayscale image format, ppm-format, rbscript, taichi, tremor-query, Creative Basic, Parrot BASIC, Rita, Spice, ddfql, sora, zephyr-asdl, blz, PkgConfig, PacmanConf, Lighttpd configuration file

Example from Java, JavaScript, C, C++, PHP, Go, C#, Scala, Swift, Rust, TypeScript, Objective-C, Kotlin, Dart, Groovy, F#, D, Solidity, Delphi, Chapel, Verilog, Reason, Haxe, Dylan, Pug, Vala, BCPL, ANTLR, Io, Deno, Rust MIR, Wren, Ballerina, Hack, Yacc, V, Protocol Buffers, CIL, OpenCL, HCL, Pike, Fantom, Stata, SuperCollider, Scilab, Falcon, Nemerle, Ceylon, Squirrel, JSON5, PEG.js, Xojo, Bison, FLUX, Processing, Clean, Koka, Lasso, Eve, xBase, Zephir, Dafny, Java Bytecode, DOT, ATS, Modelica, SystemVerilog, Clipper, Bicep, Less, halide, LPC, Flow, CIL, JAI, odin, AspectJ, BETA, QML, Lex, Cg, Objective-J, SIL, Observable, Cue, idyll, Felix, JADE, Alloy, Click, PowerBuilder, Flow9, OpenSCAD, Ch, eC, P4, IGOR Pro, Angelscript, Whiley, PAWN, Cypher Query Language, DAX, SugarSS, MiniD, Apex, Not Quite C, SCSS, mlir, Ron, Volt, Concise Encoding, CIR, JSL, Spatial, OpenVera, Ligo, PowerQuery M, MQL5, Argdown, OX, mun-lang, Mask, ECL, Harbour, DM, Frink, Cell, Hocon, JSON with Comments, Linden Scripting Language, Script.NET, XBase++, Strips, Game Maker Language, Objective C++, KRL, Rescript, Not eXactly C, Ion, NetLinx, Logos, Q#, Cycript, POV-Ray SDL, Sophia, c3, Jsonnet, Fable, NS Basic, FutureBASIC, spiral, LoomScript, Slice, Type Language, Yoix, Judoscript, beads-lang, Tuple space, Vale, Adventure Game Studio Script, CartoCSS, gentee, kai, winxed, SimCode, Language Server Index Format, owen-lang, dlvm, Soy, MVEL, HuJSON, ShaderLab, Nymph, tht, Lite-C, silk, Heron, fizz, verifpal, Finite State Language, holyc, Maya Embedded Language, OEM, neeilang, hilvl, epsilon, flagship, StruQL, xxl, CFScript, OptimJ, Pnuts, Action Code Script, Operational Control Language, Treelang, ctalk-lang, dslx, rbscript, taichi, ddfql, sora:

// A comment

Example from Python, Ruby, R, Perl, Julia, Elixir, PowerShell, Tcl, CoffeeScript, Bash, Crystal, Nim, awk, Maple, YAML, fish, GraphQL, LLVM IR, MIPS architecture, Boo, TOML, Sage, AMPL, Icon, SPARQL, Perl 6, Seed7, Makefile, E, Smali, UNLAMBDA, API Blueprint, Nginx, PRQL, M4, LiveScript, Nearley, Hjson, PicoLisp, YASnippet, WDL, Unicon, CWL, AGC, Dc, Mu, Ring, mgmt, Java Properties, Tea, starlark, Logica, Expect, ArkScript, Filebench WML, GAP, Ragel, Golo, Parser 3, Pan, spry, Dockerfile, Ren'Py, Ezhil, GDScript, Gentoo Ebuild, Vigil, C shell, S-PLUS, Praat Script, Gherkin, BitBake, storyscript, NestedText, PIC, LookML, Raku, Rc, RELAX NG, Embedded Crystal, Zimpl, ldpl, Claro, Reia, FML, Yedalog, Alpine Abuild, BuddyScript, Recfiles, rbs, Robots.txt, SubX, Wart, Yet Another Scripting Language, Portable Bit Map Format, Netpbm grayscale image format, ppm-format, tremor-query, Parrot BASIC, blz:

# A comment

Example from SQL, MySQL, Haskell, Lua, PostgreSQL, Ada, Elm, Eiffel, VHDL, Idris, PureScript, PL/SQL, Applescript, MoonScript, Agda, Terra, Frege, SETL, Pig Latin, LiveCode, unison, Sather, Transact-SQL, Classroom Object Oriented Language, Dhall, Euphoria, Aldor, OCL, HiveQL, Opal, dex, Amazon Redshift, manool, Z, Literate Agda, VHDL-AMS, Grammatical Framework, ISETL, omega, Bla, luau, zephyr-asdl:

-- A comment

Example from MATLAB, Erlang, Prolog, PostScript, GNU Octave, LaTeX, Tex, Oz, Mercury, KaTeX, Turing, Datalog, Mary, Eclipse Command Language, Charity:

% A comment

Example from Fortran:

C A comment

Example from Scheme, Clojure, ARM, Common Lisp, Racket, Emacs Lisp, REBOL, MUMPS, Red, Hy, Logo, AutoIt, PureBasic, Guile, LFE, AutoHotkey, Ini, x86 Assembly, Csound, carp, NetLogo, CLIPS, wisp, Fennel, NSIS, datascript, NCAR Command Language, Netwide Assembler, Action!, KiXtart, Augmented Backus-Naur Form, lispyscript, Jasmin, EuLisp, SMT, Bel, CLOS, neut, Project Mentat, carth, Ren, SRecode Template, Sweet Expressions, Reactive Plan Language, GCC Machine Description, Fjölnir, taf, z80, Guix Workflow Language, Plot, rosette-lang, PROMAL, lain, stella, turnstile, MACRO-10, atomese, wescheme, ca65 Assembly:

; A comment

Example from COBOL:

MOVE ABC to XYZ *> This is a comment.

Example from SAS, SNOBOL, ABAP, Refal, ActiveVFP:

* A comment

Example from Visual Basic, Visual Basic .NET, VBScript, VBA, Monkey, QB64, PowerBASIC, Spin, Xbasic, ThinBasic, Caché Basic, Turbo Basic, XBLite, WxBasic, Brightscript, StarOffice Basic, Creative Basic:

' A comment

Example from BASIC, Batchfile:

REM A comment

Example from APL:

⍝ A comment

Example from Forth:

\ A comment

Example from Simula, S-algol, True BASIC, Structured Query Reporter, BLISS, Module Management System:

! A comment

Example from HAML:

-# A comment

Example from J:

NB. A comment

Example from K:

/ A comment

Example from HOPE:

--- A comment

Example from TLA:

\* A comment

Example from popr:

__ A comment

Example from Mouse:

~ A comment

Example from Quaint:

;; A comment

Example from Lexon:

COMMENT A comment

Example from GraphQL Schema Definition Language:

“”” A comment

Article source

PLDB - Build the next great programming language. v5.0.0 - Acknowledgements · Email · GitHub