Atitit. Composite variables, that is, similar to the $ $a variable principle and implementation of Java c#.net PHP js

Source: Internet
Author: User

atitit. compound variables, that is, variables like $ $a the principle and realization of java c#.net php js

1 . 1. A compound variable, which is a variable like $ $a , is interpreted two times. 1

1 . 2. compound variables inside the database 1

1 . 3. why only PHP implements the compliance variable, because his dollar sign 2

1 . 4. the nature of a conforming variable is actually a pointer. 2

2 .  Implementing a conforming variable using java 2

2 . 1. Invoke 2

2 . 2. Implement 2

3 .  Reference 4

1.1.A compound variable, which is a variable like $ $a , is interpreted two times.

This gives PHP a very flexible dynamic feature.

1.2.compound variables inside the database

Records (record)

What is a record:

a record is a compound variable that consists of several related values and is often used to support SELECT The return value of the statement. Records can be used to treat a row of data as a unit, rather than having to handle each column separately, similar to an object in an object-oriented programming language or a C -language structure.

Plsql Compound Variable

a compound variable refers to a variable that holds multiple values. When you define a composite variable, you must use The composite data type of PL/SQL. PL/SQL includes
Four composite data types such as PL/SQL records,PL/SQL tables, nested tables, and varray .

1.3.why onlyPHP implements a compliance variable because his dollar sign

Dollar inherited from perl...

Dollar is not a must. Only need to use when the fatal dollar is OK lazy. not nessury var must dollar start:

author:: Nickname:Old Wow's claws( Full Name::AttilaxAkbar Al Rapanui Attilaksachanui) Kanji Name:Ayron, email:[email protected]

Reprint please indicate source: http://www.cnblogs.com/attilax/

1.4.the nature of a conforming variable is actually a pointer.2. Implementing a conforming variable using java 2.1.Invoke

Import static AAA. varutil.*;

Public class Dynavar {

Public static void main (string[] args) {

def Span style= "Font-family:consolas; Color: #000000; font-size:12pt; " > ( "$a" , "v_a" );

def Span style= "Font-family:consolas; Color: #000000; font-size:12pt; " > ( "$b" ,  );

echo Span style= "Font-family:consolas; Color: #000000; font-size:12pt; " > ( $ ( "$b" ));

Echo ($("$ $b"));

}

2.2.Implement

Package AAA;

Import Java.util.Map;

Import com.attilax.lang.AString;

Import Com.google.common.collect.Maps;

public class Varutil {

public static Map Vars_map=maps.newconcurrentmap ();

/**

*//var Use

* @param var_name

* @return

*/

public static Object $ (String var_name) {

int Dollarindex=var_name.lastindexof ("$");

if (dollarindex==0)

Return Vars_map.get (Var_name);

String Left=astring.left (Var_name, Dollarindex);

String rit= var_name.substring (Dollarindex);

Char[] A=left.tochararray ();

Object var_v= Vars_map.get (RIT);

for (int i = 0; i < a.length; i++) {

String new_var_name= "$" +var_v.tostring ();

Var_v=vars_map.get (New_var_name);

}

return var_v;

}

// //var Define

public static void Def (string var_name, String var_val) {

Vars_map.put (Var_name, var_val);

}

public static void Echo (Object get_var) {

System.out.println (Get_var);

}

/**

*//var Use

* @param var_name

* @return

*/

// Public static Object $ (String var_name) {

// //TODO auto-generated method stub

// return Vars_map.get (var_name);

// }

}

3.Reference

Plsql Complex variables and reference variables - Blue - Blog Park . htm

Atitit. Composite variables, that is, similar to the $ $a variable principle and implementation of Java c#.net PHP js

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.