Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

AnyLang Programming Language Comparison/Introduction/Variables

From Wikibooks, open books for an open world
<AnyLang Programming Language Comparison |Introduction

Core concepts

[edit |edit source]
  • declaration
  • assignment
    • assignment by reference
    • assignment by value
  • typing (type system)
    • type conversion (explicit)
    • type conversion (implicit)


Common types

[edit |edit source]

String

[edit |edit source]
  - label:   string    a_abbrv: anylang/string (ss)    a_aka:   string varchar

Array

[edit |edit source]
  - label:   array    a_abbrv: anylang/array (aa)    a_aka:   list simple_sequence

Core concepts

[edit |edit source]
  • core_arrayop.append;; (aka array push) insert a single-element at the highest index. array treated as a single nested element
  • core_arrayop.prepend;; (aka array unshift) insert element at the lowest index
  • core_arrayop.unappend;; (aka array pop) remove and return element at the highest index
  • core_arrayop.unprepend;; (aka array shift) remove and return element at the lowest index

Associative array

[edit |edit source]

An associative array is a mapping of keys to values. This is also known as a Hash, Hashtable and Dictionary.[1][2]

References

[edit |edit source]
  1. "Associative_array". Retrieved2010-05-01.http://en.wikipedia.org/wiki/Associative_array
  2. From "Dive into Python" NoteA dictionary in Python is like a hash in Perl. In Perl, variables which store hashes always start with a % character; in Python, variables can be named anything, and Python keeps track of the datatype internally.NoteA dictionary in Python is like an instance of the Hashtable class in Java.NoteA dictionary in Python is like an instance of the Scripting.Dictionary object in Visual Basic.
Retrieved from "https://en.wikibooks.org/w/index.php?title=AnyLang_Programming_Language_Comparison/Introduction/Variables&oldid=3252685"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp