digitalmars.D.learn - ore.exception.RangeError
- Vino.B (25/25) Aug 22 2017 Hi All,
- ag0aep6g (3/14) Aug 22 2017 When args.length == 1, then the one element is args[0], not args[1].
- Moritz Maxeiner (4/19) Aug 23 2017 To expand on that: argv[0] is what is passed to the process the D
- Vino.B (6/27) Aug 23 2017 Hi All,
Hi All,
Can any one guide me what is wrong with the below code , whil i
run the code without any arguments is am getting the below
exception
Execution :
rdmd Summary.d - Not working
rdmd Summary.d test - Working
Program:
void main (string[] args)
{
if(args.length != 2 )
writefln("Unknown operation: %s", args[1]);
}
core.exception.RangeError Summary.d(197): Range violation
----------------
0x00416218
0x0041AA8F
0x0041AA53
0x0041A954
0x00413C0F
0x75EB336A in BaseThreadInitThunk
0x776B9902 in RtlInitializeExceptionChain
0x776B98D5 in RtlInitializeExceptionChain
From,
Vino.B
Aug 22 2017
On 08/23/2017 07:45 AM, Vino.B wrote:
Execution :
rdmd Summary.d - Not working
rdmd Summary.d test - Working
Program:
void main (string[] args)
{
if(args.length != 2 )
writefln("Unknown operation: %s", args[1]);
}
When args.length == 1, then the one element is args[0], not args[1].
args[1] only exists when args.length >= 2.
Aug 22 2017
On Wednesday, 23 August 2017 at 05:53:46 UTC, ag0aep6g wrote:On 08/23/2017 07:45 AM, Vino.B wrote:To expand on that: argv[0] is what is passed to the process the D program runs at in the system call it was spawned from (e.g. execve), which usually corresponds to the program's name.Execution : rdmd Summary.d - Not working rdmd Summary.d test - Working Program: void main (string[] args) { if(args.length != 2 ) writefln("Unknown operation: %s", args[1]); }When args.length == 1, then the one element is args[0], not args[1]. args[1] only exists when args.length >= 2.
Aug 23 2017
On Wednesday, 23 August 2017 at 11:18:14 UTC, Moritz Maxeiner wrote:On Wednesday, 23 August 2017 at 05:53:46 UTC, ag0aep6g wrote:Hi All, Thank you very much, was able to resolve this issue. From, Vino.BOn 08/23/2017 07:45 AM, Vino.B wrote:To expand on that: argv[0] is what is passed to the process the D program runs at in the system call it was spawned from (e.g. execve), which usually corresponds to the program's name.Execution : rdmd Summary.d - Not working rdmd Summary.d test - Working Program: void main (string[] args) { if(args.length != 2 ) writefln("Unknown operation: %s", args[1]); }When args.length == 1, then the one element is args[0], not args[1]. args[1] only exists when args.length >= 2.
Aug 23 2017








Vino.B <vino.bheeman hotmail.com>