User Tools

Site Tools


en:devmon:guidelines:variables

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:devmon:guidelines:variables [2021/08/12 09:34] – created Bruno Manzonien:devmon:guidelines:variables [2021/09/09 09:22] (current) – [Quantity] adminw1k1
Line 1: Line 1:
-==== Variable name ====+ 
 +===== Variable Name ===== 
 + 
 +==== In General ==== 
   * Avoid CamelCase and variation: use **underscore**   * Avoid CamelCase and variation: use **underscore**
   * As short as possible to describe the "function" of the var: sample my $desc = "devmon is cool"   * As short as possible to describe the "function" of the var: sample my $desc = "devmon is cool"
  
-=== With or without "s" at the end ===+==== With or without "s" at the end ====
   * scalar($) and hash(%) without "s"   * scalar($) and hash(%) without "s"
   * array(@) with an "s"   * array(@) with an "s"
  
-=== Avoid ambiguous names ===+==== Avoid ambiguous names ====
   * last (final or previous)   * last (final or previous)
   * set (adjust or collection)   * set (adjust or collection)
Line 24: Line 27:
   * i, j, k, x, y, z   * i, j, k, x, y, z
  
-=== Do not use ===+==== Do not use ====
   * list, set, value, equals, data, var,   * list, set, value, equals, data, var,
  
-=== Quantity === +==== Quantity ==== 
-  * {variable}_count +  * scalar: {variable}_count 
-    * : {variable}s_count +  array : {variable}s_count (not a double "s" of course!) 
-    Hash: {variable}_count +  hash: {variable}_count 
-  * Linear Structure, hash, list ->{variable}_count +  * linear Structure , hash, list ->{variable}_count ? 
-  * Non-Linear Structure: Tree set: -> {variable}_count, ?+  * non-Linear Structure: tree, set: -> {variable}_count, ?
  
-=== Prefix ===+==== Prefix ====
   * format: as_number, as_string,   * format: as_number, as_string,
   * boolean: is_number   * boolean: is_number
  
-=== Reference ===+==== Reference ====
   * {variable}_ref   * {variable}_ref
  
 +
 +==== Quantity ====
 +Array
en/devmon/guidelines/variables.1628753672.txt.gz · Last modified: 2021/08/12 09:34 by Bruno Manzoni