PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

Line Comments

Line Comments

Line Comments are a feature.

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


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

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

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

View source

PLDB - Build the next great programming language · v2022 · Day 33 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com