For faster navigation, this Iframe is preloading the Wikiwand page for J (programovací jazyk).

J (programovací jazyk)

J je programovací jazyk vytvořený v roce 1990 Kennethem E. Iversonem a Rogerem Huiem. Je silně ovlivněn jazykem APL a function-level programovacími jazyky FL a FP. Na rozdíl od APL používá znakovou sadu ASCII.

Vlastnosti jazyka

[editovat | editovat zdroj]

J nevyžaduje, aby funkce specifikovala své parametry. Z toho důvodu je jeho kód špatně čitelný pro ty, kteří tento jazyk neznají.

Datové typy

[editovat | editovat zdroj]
  • Numeric
  • Literal
  • Boxed

Datový typ numeric má několik variant. Může být typu bit, integer (celé číslo), floating point (desetinné číslo), complex (komplexní číslo), extended precision integer (celké celé číslo) a rational fraction (zlomek).

Datový typ literal reprezentuje jeden znak. Znaky se dávají do uvozovek ('a'). Seznam znaků lze zapsat jako více znaků v uvozovkách ('ahoj').

Datový typ boxed se vytváří tak, že to, co má být v boxu se napíše doprava vedle <.

<1 0 1 0

Výsledek má datový typ boxed.

Příklady

[editovat | editovat zdroj]

Definice funkce, která vypočítá průměr z libovolného počtu čísel:

prumer=: +/ % #

+/ sečte všechny prvky pole, # vrátí počet prvků pole a % tyto dvě hodnoty vydělí. Volání funkce:

prumer 1 2 3 4

Funkce dostane pole, které obsahuje 1, 2, 3, a 4.

Pahýl Tento článek je příliš stručný nebo postrádá důležité informace.Pomozte Wikipedii tím, že jej vhodně rozšíříte. Nevkládejte však bez oprávnění cizí texty.
{{bottomLinkPreText}} {{bottomLinkText}}
J (programovací jazyk)
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?