Thread overview | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
February 10, 2004 [Language design] yet another notational error | ||||
---|---|---|---|---|
| ||||
void main() { char[4] foo= "1234"; char[] bar; bar.length= 5; bar[0..2]= foo[1.3]; printf("%.*s\n", bar); } Would you also recognize it in millions of lines of code? So long. |
February 10, 2004 Re: [Language design] yet another notational error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred Nowak | use ****ing syntax highlighting!! :D yes, i can see it definitely "Manfred Nowak" <svv1999@hotmail.com> schrieb im Newsbeitrag news:c0bb5v$238e$1@digitaldaemon.com... > void main() > { > char[4] foo= "1234"; > char[] bar; > > bar.length= 5; > bar[0..2]= foo[1.3]; > printf("%.*s\n", bar); > } > > Would you also recognize it in millions of lines of code? > > So long. |
February 10, 2004 Re: [Language design] yet another notational error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred Nowak | Im not sure what your trying to change. Your foo slicing is incorrect, your saying its easy to overlook that ? What do u propose ? C "Manfred Nowak" <svv1999@hotmail.com> wrote in message news:c0bb5v$238e$1@digitaldaemon.com... > void main() > { > char[4] foo= "1234"; > char[] bar; > > bar.length= 5; > bar[0..2]= foo[1.3]; > printf("%.*s\n", bar); > } > > Would you also recognize it in millions of lines of code? > > So long. |
February 10, 2004 Re: [Language design] yet another notational error | ||||
---|---|---|---|---|
| ||||
Posted in reply to C | C wrote:
> Im not sure what your trying to change. Your foo slicing is incorrect, your
> saying its easy to overlook that ? What do u propose ?
>
> C
>
>
> "Manfred Nowak" <svv1999@hotmail.com> wrote in message
> news:c0bb5v$238e$1@digitaldaemon.com...
>
>>void main()
>>{
>> char[4] foo= "1234";
>> char[] bar;
>>
>> bar.length= 5;
>> bar[0..2]= foo[1.3];
>> printf("%.*s\n", bar);
>>}
>>
>>Would you also recognize it in millions of lines of code?
>>
>>So long.
>
>
>
change? it'll be quite difficult, if I'm not mistaken this will compile, and the 1.3 will be implicitly casted to an int
bye,
roel
|
February 10, 2004 Re: [Language design] yet another notational error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Roel Mathys | Oh i see , yowsa. I thought the compiler would catch it ... hmm maybe disallow implicit casting in index's , shrug. C "Roel Mathys" <roel.mathys@yucom.be> wrote in message news:c0bi43$2enf$1@digitaldaemon.com... > C wrote: > > Im not sure what your trying to change. Your foo slicing is incorrect, your > > saying its easy to overlook that ? What do u propose ? > > > > C > > > > > > "Manfred Nowak" <svv1999@hotmail.com> wrote in message news:c0bb5v$238e$1@digitaldaemon.com... > > > >>void main() > >>{ > >> char[4] foo= "1234"; > >> char[] bar; > >> > >> bar.length= 5; > >> bar[0..2]= foo[1.3]; > >> printf("%.*s\n", bar); > >>} > >> > >>Would you also recognize it in millions of lines of code? > >> > >>So long. > > > > > > > > change? it'll be quite difficult, if I'm not mistaken this will compile, and the 1.3 will be implicitly casted to an int > > bye, > roel |
February 10, 2004 Re: [Language design] yet another notational error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred Nowak | In article <c0bb5v$238e$1@digitaldaemon.com>, Manfred Nowak says... > >void main() >{ > char[4] foo= "1234"; > char[] bar; > > bar.length= 5; > bar[0..2]= foo[1.3]; > printf("%.*s\n", bar); >} > >Would you also recognize it in millions of lines of code? > >So long. This would be why I was taught to _always_ put spaces between elements (tokens?): bar [ 0 .. 2 ] = foo [ 1.3 ] ; makes the situation much clearer, and bar [ 0 .. 2 ] = foo [ 1 . 3 ] ; is an error. |
February 10, 2004 Re: [Language design] yet another notational error | ||||
---|---|---|---|---|
| ||||
Posted in reply to davepermen | davepermen wrote:
> use ****ing syntax highlighting!! :D
> yes, i can see it definitely
I do not believe you. Do you know of a system or site where the time between download and upload of files is recorded?
If such system or site exist I propose that you are not able to do the
following:
1. you download a file that I would have produced in the following way:
1.a. defining a class `C' containing something like opSlice(int, int) and
opIndex(real)
1.b. declaring a variable `c' of class `C' in the `main' function
1.c. randomly generating 2 million lines of code containing calls of the
form c[int..int] and c[real] in the body of `main'
1.d. changing one call c[int..int] to c[real] _or_ one call c[real] to
c[int..int] by inserting or deleting a `.'
2. you find in appropriate time the error, i.e. the line which I have
changed in step 1.d., and correct it by either deleting or inserting a
`.'
3. you proove the appropriate time of finding the error by uploading the
corrected file
4. the file you uploaded and my unmodified randomly generated file are
identical
So long.
|
February 11, 2004 Re: [Language design] yet another notational error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Juan C | Juan C wrote:
[...]
> bar [ 0 .. 2 ] = foo [ 1.3 ] ;
> makes the situation much clearer, and
> bar [ 0 .. 2 ] = foo [ 1 . 3 ] ;
> is an error.
This would not help you, when you want to type `[ 1.3 ]', but your keyboard spits out a `[ 1..3 ]' because of a temporary malfunction of the `.'-key.
But a requirement of the language, that the `..' has to be preceeded or followed by whitespace would help you out.
And in your case this requirement would not be of any hardship.
So long.
|
February 11, 2004 Re: [Language design] yet another notational error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred Nowak | Manfred Nowak wrote: > Juan C wrote: > > [...] > >>bar [ 0 .. 2 ] = foo [ 1.3 ] ; >>makes the situation much clearer, and bar [ 0 .. 2 ] = foo [ 1 . 3 ] ; >>is an error. > > > This would not help you, when you want to type `[ 1.3 ]', but your > keyboard spits out a `[ 1..3 ]' because of a temporary malfunction of the > `.'-key. Seriously... If a person actually has this problem in Windows, he/she might get a benefit from turning on FilterKeys (if you want Windows to ignore brief or repeated keystrokes, or slow the repeat rate). If a person can't see the characters on the screen, he/she may want to adjust the monitor's resolution or change the font size in their editor. (If a person only wants to complain, then they can just complain.) > But a requirement of the language, that the `..' has to be preceeded or > followed by whitespace would help you out. > > And in your case this requirement would not be of any hardship. > > So long. -- Justin http://jcc_7.tripod.com/d/ |
February 11, 2004 Re: [Language design] yet another notational error | ||||
---|---|---|---|---|
| ||||
Posted in reply to J C Calvarese | J C Calvarese wrote: > Seriously... [...] > (If a person only wants to complain, then they can just complain.) http://remus.rutgers.edu/~rhoads/Obfuscated_C/bright How quick can you tell the public, what the meaning of the comments in the example referenced above is? So long. |
Copyright © 1999-2021 by the D Language Foundation