Mudanças entre as edições de "Avoid encodings: Hungarian Notation"

De Basef
Ir para: navegação, pesquisa
Linha 5: Linha 5:
 
* '''bReadLine(bPort,&arru8NumberList)''' : function with a byte-value return code.
 
* '''bReadLine(bPort,&arru8NumberList)''' : function with a byte-value return code.
 
* '''strName''' : Variable represents a string ("str") containing the name, but does not specify how that string is implemented.
 
* '''strName''' : Variable represents a string ("str") containing the name, but does not specify how that string is implemented.
 +
* '''rwPosition''' : variable represents a row ("rw");
 +
* '''usName''' : variable represents an unsafe string ("us"), which needs to be "sanitized" before it is used (e.g. see code injection and cross-site scripting for examples of attacks that can be caused by using raw user input)
 +
* '''szName''' : variable is a zero-terminated string ("sz"); this was one of Simonyi's original suggested prefixes.
  
  
 
[[Category: Clean Code]]
 
[[Category: Clean Code]]

Edição das 12h11min de 27 de janeiro de 2020

Examples of Hungarian Notation:

  • lAccountNum : variable is a long integer ("l");
  • arru8NumberList : variable is an array of unsigned 8-bit integers ("arru8");
  • bReadLine(bPort,&arru8NumberList) : function with a byte-value return code.
  • strName : Variable represents a string ("str") containing the name, but does not specify how that string is implemented.
  • rwPosition : variable represents a row ("rw");
  • usName : variable represents an unsafe string ("us"), which needs to be "sanitized" before it is used (e.g. see code injection and cross-site scripting for examples of attacks that can be caused by using raw user input)
  • szName : variable is a zero-terminated string ("sz"); this was one of Simonyi's original suggested prefixes.