Menu
Home
Create new Paste
Log in
A simple, dynamic array slicing example
Code
Theme: cobalt
Theme: eclipse
Theme: elegant
Theme: monokai
Theme: neat
Theme: night
Theme: rubyblue
import std.stdio; import std.conv; int main() { int[] ina = [0, 1, 22, 11, 5, 9, 3]; auto arr = ina[2..5]; writeln(arr); return 0; } /*** output: [22, 11, 5] ****/
Result:
Success
/
Return code: 0
/
Compilation time:
1.722
seconds
/
Run time:
0.012
seconds
Application output:
[22, 11, 5]
Username
Message
Add comment
Paste info
Author:
dejan
Views:
100
Private:
no
Expires:
Never
Uploaded:
11.01.13 9:55
Tags:
array
slice
Votes
:
0
Tweet
Compilation
Compiler:
DMD 2.061
Pointer size:
m64
Actions
Download
Fork
Raw
×
Confirm
Are you sure you want to delete this paste?
There's no way back!
×
Confirm
Reason