Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
16
Task/Variables/Batch-File/variables.bat
Normal file
16
Task/Variables/Batch-File/variables.bat
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
@echo off
|
||||
|
||||
::setting variables in defferent ways
|
||||
set myInt1=5
|
||||
set myString1=Rosetta Code
|
||||
set "myInt2=5"
|
||||
set "myString2=Rosetta Code"
|
||||
|
||||
::Arithmetic
|
||||
set /a myInt1=%myInt1%+1
|
||||
set /a myInt2+=1
|
||||
set /a myInt3=myInt2+ 5
|
||||
|
||||
set myInt
|
||||
set myString
|
||||
pause>nul
|
||||
|
|
@ -1,10 +1,4 @@
|
|||
*> Group data items do not have a picture clause.
|
||||
01 group-item. *> The 'implied' PIC for group-item is PIC X(20).
|
||||
01 group-item.
|
||||
03 sub-data PIC X(10).
|
||||
03 more-sub-data PIC X(10).
|
||||
|
||||
*> Example use of FILLER.
|
||||
01 formatted-data.
|
||||
03 part-one PIC X(10).
|
||||
03 FILLER PIC X.
|
||||
03 part-two PIC X(10).
|
||||
|
|
|
|||
|
|
@ -6,6 +6,3 @@ WORKING-STORAGE SECTION.
|
|||
PROCEDURE DIVISION.
|
||||
DISPLAY initialized-data *> Shows 'Hello, World!'
|
||||
DISPLAY other-data *> Will probably show 15 spaces.
|
||||
...
|
||||
*> Sets initialized-data back to "Hello, World!" and fills other-data with spaces.
|
||||
INITIALIZE initialized-data, other-data
|
||||
|
|
|
|||
|
|
@ -2,7 +2,5 @@ some-str (1:1) *> Gets the first character from the string
|
|||
some-num (1:3) *> Get the first three digits from the number
|
||||
another-string (5:) *> Get everything from the 5th character/digit onwards.
|
||||
|
||||
*> To get a proper array slice, you must use reference modification on its parent data item:
|
||||
some-table-area (4:6) *> Get 6 characters from the array after from the 4th char onwards
|
||||
*> To reference modify an array element
|
||||
some-table (1) (5:1) *> Get the 5th character from the 1st element in the table
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue