Ricerca…


introduzione

Scribble è lo strumento utilizzato per creare la documentazione di Racket e puoi anche documentare i tuoi pacchetti con esso! Una volta pubblicati, la loro documentazione apparirà su https://docs.racket-lang.org/ , insieme alla documentazione principale di Racket.

Scribble è implementato come linguaggio per la piattaforma Racket. Pertanto, i documenti #lang scribble/manual iniziano di solito con #lang scribble/manual

Paragrafi e sezioni

#lang scribble/manual

@section{Introduction}

First paragraph. Some text, some text, some text,
some text, some text, some text.

@section{More stuff}

@subsection{This is a subsection}

Second paragraph. More text, more text, more text,
more text, more text, more text.

Documentare un'associazione fornita da un pacchetto

#lang scribble/manual

@; Make sure that code highlighting recognises identifiers from my-package:
꩜require[@for-label[my-package]]

@; Indicate which module is exporting the identifiers documented here.
@defmodule[my-package]

@defproc[(my-procedure [arg1 number?] [arg2 string?]) symbol?]{
  The @racket[my-procedure] function repeats the @racket[arg2] string
  @racket[arg1] times, and transforms the result into a symbol.

  @history[#:added "1.0"
           #:changed "1.1" @elem{Improved performance,
                                 from @tt{O(n²)} to @tt{O(n)}}]
}

Come regola generale, un modulo (qualcosa che potrebbe apparire alla destra di un (require foo/bar) , cioè foo/bar ) dovrebbe essere documentato da un singolo file .scribble . Un file .scribble può documentare diversi moduli, purché ciascuno sia documentato in una sezione @section separata.



Modified text is an extract of the original Stack Overflow Documentation
Autorizzato sotto CC BY-SA 3.0
Non affiliato con Stack Overflow