# US 2008/0313604 A1 · System and method for automatically declaring variables

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2008/0313604 A1
- Document ID: US20080313604A1
- Status: Published application
- Kind: A1
- Application number: 12/125,152
- Filed: 2008-05-22
- Published: 2008-12-18
- Earliest claimed: 2007-06-12
- Assignees: International Business Machines (IBM) Corporation
- Inventors: Greg Cowtan
- Web page: https://patentgrep.com/patent/US20080313604A1

## CPC

- G06F 8/30: Creation or generation of source code
- G06F 8/33: Intelligent editors
- G06F 8/44: {Encoding}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and method for declaring variables during coding of a software program. The method includes, for each variable type, defining a unique string representing a variable declaration instruction and adapting a coding module wherein, when a string representing a variable declaration instruction is typed adjacent to a new variable name, the coding module automatically generates code for the corresponding variable declaration statement for a new variable having the new variable name and the specified variable type. The method further includes defining a reserved variable declaration area in the software program and placing any code generated by the coding module for the variable declaration statement into the reserved variable declaration area. Each unique string representing a variable declaration instruction may be a prefix or suffix that may be typed adjacent to the new variable name.

## Claims

### Claim 1

A method of declaring variables during coding of a software program, comprising:
for each variable type, defining a unique string representing a variable declaration instruction; and
adapting a coding module wherein when a string representing a variable declaration instruction is typed adjacent to a new variable name, the coding module automatically generates code for the corresponding variable declaration statement for a new variable having the new variable name and the specified variable type.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
defining a reserved variable declaration area in the software program; and
placing any code generated by the coding module for the variable declaration statement into the reserved variable declaration area.

### Claim 3 (depends on 2)

The method of claim 2, further comprising configuring the coding module to order any variable declaration statements placed into the reserved variable declaration area by at least one of variable name and variable type.

### Claim 4 (depends on 1)

The method of claim 1, further comprising defining each unique string representing a variable declaration instruction as a prefix or suffix that may be typed adjacent to the new variable name.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
tracking the variable declaration instructions for each new variable name; and
warning the programmer if the programmer attempts to use the same variable name to declare a new variable name of another data type.

### Claim 6 (depends on 1)

The method of claim 1, further comprising configuring the coding module to allow a programmer to define the unique string representing a variable declaration instruction.

### Claim 7 (depends on 1)

The method of claim 1, further comprising programming a programmable key to generate the unique string representing the variable declaration instruction for each variable type.

### Claim 8

A system for declaring variables during coding of a software program, comprising:
means for defining, for each variable type, a unique string representing a variable declaration instruction; and
a coding module adapted to automatically generate code for a corresponding variable declaration statement when a string representing a variable declaration instruction is typed adjacent to a new variable name.

### Claim 9 (depends on 8)

The system of claim 8, further comprising:
means for defining a reserved variable declaration area in the software program; and
means for placing any code generated by the coding module for the variable declaration statement into the reserved variable declaration area.

### Claim 10 (depends on 9)

The system of claim 9, wherein the coding module is further configured to order any variable declaration statements placed into the reserved variable declaration area by at least one of variable name and variable type.

### Claim 11 (depends on 8)

The system of claim 8, further comprising means for defining each unique string representing a variable declaration instruction as a prefix or suffix that may be typed adjacent to the new variable name.

### Claim 12 (depends on 8)

The system of claim 8, wherein the coding module is further configured to:
track the variable declaration instructions for each new variable name; and
warn the programmer if the programmer attempts to use the same variable name to declare a new variable name of another data type.

### Claim 13 (depends on 8)

The system of claim 8, wherein the coding module is further configured to allow a programmer to define the unique string representing a variable declaration instruction.

### Claim 14 (depends on 8)

The system of claim 8, wherein the coding module is further adapted to program a programmable key to generate the unique string representing the variable declaration instruction for each variable type.

### Claim 15

A data processor readable medium storing data processor code that when loaded into a device adapts the device to perform a method of declaring variables during coding of a software program, the data processor readable medium comprising:
code for each variable type, defining a unique string representing a variable declaration instruction;
code for adapting a coding module such that, when a string representing a variable declaration instruction is typed adjacent to a new variable name, the coding module automatically generates code for the corresponding variable declaration statement for a new variable having the new variable name and the specified variable type.

### Claim 16 (depends on 15)

The data processor readable medium of claim 15, further comprising:
code for defining a reserved variable declaration area in the software program; and
code for placing any code generated by the coding module for the variable declaration statement into the reserved variable declaration area.

### Claim 17 (depends on 16)

The data processor readable medium of claim 16, further comprising code for configuring the coding module to order any variable declaration statements placed into the reserved variable declaration area by at least one of variable name and variable type.

### Claim 18 (depends on 15)

The data processor readable medium of claim 15, further comprising code for defining each unique string representing a variable declaration instruction as a prefix or suffix that may be typed adjacent to the new variable name.

### Claim 19 (depends on 15)

The data processor readable medium of claim 15, further comprising:
code for tracking the variable declaration instructions for each new variable name; and
code for warning the programmer if the programmer attempts to use the same variable name to declare a new variable name of another data type.

### Claim 20 (depends on 15)

The data processor readable medium of claim 15, further comprising code for configuring the coding module to allow a programmer to define the unique string representing a variable declaration instruction.
