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

Line Comments

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

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

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

Our definition

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

letter-first-identifiers.html · line-comments.html · lists.html

View source

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