digitalmars.D.announce - DMD 0.132 release
- Walter Bright (2/2) Sep 24 2005 Extensive update of Ddoc, www.digitalmars.com/d/ddoc.html
- Vathix (6/8) Sep 24 2005 DMD version number is goofed up all over the place.
- Rod Haper (2/7) Sep 24 2005 Ummm ... 0.133 - right? The Change Log also says 0.132 but links to 0.1...
- Walter Bright (3/4) Sep 24 2005 Yes. Fixed.
-
David L. Davis
(24/26)
Sep 24 2005
Walter, these are some really great improvements!
- Derek Parnell (8/8) Sep 24 2005 Can you please alter DMD to use both sc.ini file *and* a user defined .i...
- Walter Bright (3/7) Sep 24 2005 Mark yours as read-only, and it should survive.
- Derek Parnell (7/15) Sep 25 2005 But then I don't get any new things that you might have created in DMD's
- Walter Bright (5/16) Sep 25 2005 .ini
- J C Calvarse (10/14) Sep 25 2005 Or if sc.ini were renamed to sc.ini.sample, and it was up to the user se...
- Derek Parnell (65/68) Sep 25 2005 (1) There is something wrong with the .ddoc files. They seem to be
- Walter Bright (15/75) Sep 25 2005 anything
- Walter Bright (8/17) Sep 26 2005 The way to do this is:
- Derek Parnell (8/32) Sep 26 2005 Yuck! I hope this is just work around. _Ugly_ is not a good thing in
- Walter Bright (5/17) Sep 26 2005 At one level I agree with you, at the other I'm worried about too many
- Walter Bright (11/54) Sep 26 2005 I've got this one fixed now.
- Derek Parnell (19/87) Sep 27 2005 Okay, so the work around is something like ...
- Walter Bright (8/11) Sep 27 2005 It might work, but I'm not sure. The fundamental problem is that the
- Walter Bright (10/17) Sep 27 2005 used. )
- Stewart Gordon (17/20) Sep 26 2005 I see you're gradually getting back into working on the compiler itself.
- Walter Bright (2/2) Sep 26 2005 Sorry. I want to get Ddoc in a usable state, then I'll turn back to the
- James Dunne (3/7) Sep 26 2005 Walter's gotta have his fun, guys! I would get so burned out fixing bug...
- Tom S (5/5) Sep 26 2005 dmd.133 breaks nested functions in some weird way :( I haven't been unab...
- zwang (6/13) Sep 26 2005 Weird. The changelog doesn't say anything about nested functions.
- Walter Bright (4/9) Sep 26 2005 I didn't change anything with nested functions.
- Regan Heath (12/22) Sep 26 2005 I suspect zwang is referring to the std.string.find bug reported recentl...
- zwang (4/39) Sep 26 2005 That's the bug I was referring to.
- Derek Parnell (9/37) Sep 26 2005 Exactly my point I just posted. This really should be
- Walter Bright (3/12) Sep 26 2005 Oops!
- Jan Ole Andreasen (5/22) Sep 27 2005 Oops = Objectoriented outragious programming solution
- Derek Parnell (12/24) Sep 26 2005 You're kidding, right? Changing a parameter from a signed type to an
Extensive update of Ddoc, www.digitalmars.com/d/ddoc.html http://www.digitalmars.com/d/changelog.html
Sep 24 2005
On Sat, 24 Sep 2005 20:43:51 -0400, Walter Bright <newshound digitalmars.com> wrote:Extensive update of Ddoc, www.digitalmars.com/d/ddoc.html http://www.digitalmars.com/d/changelog.htmlDMD version number is goofed up all over the place. Skimming http://www.digitalmars.com/d/ddoc.html again I noticed it says "See_Also: List of other symbols and URL's to related items." and uses "References:" in the code sample.
Sep 24 2005
Walter Bright wrote:Extensive update of Ddoc, www.digitalmars.com/d/ddoc.html http://www.digitalmars.com/d/changelog.htmlUmmm ... 0.133 - right? The Change Log also says 0.132 but links to 0.133.
Sep 24 2005
"Rod Haper" <rhaper houston.rr.com> wrote in message news:dh5184$13gv$1 digitaldaemon.com...Ummm ... 0.133 - right?Yes. Fixed.
Sep 24 2005
In article <dh4s2l$vhb$1 digitaldaemon.com>, Walter Bright says...Extensive update of Ddoc, www.digitalmars.com/d/ddoc.html http://www.digitalmars.com/d/changelog.htmlWalter, these are some really great improvements! <g> But I do have a couple of minor things I've found thus, far that are bugging me. Thanks for the work you've done so far! David L. ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" ------------------------------------------------------------------- MKoD: http://spottedtiger.tripod.com/D_Language/D_Main_XP.html
Sep 24 2005
Can you please alter DMD to use both sc.ini file *and* a user defined .ini file (maybe site_sc.ini) such that the definitions in the user file override the ones in sc.ini. That way, whenever you distribute a new DMD you won't wipe out my changes to sc.ini. -- Derek Parnell Melbourne, Australia 25/09/2005 4:31:34 PM
Sep 24 2005
"Derek Parnell" <derek psych.ward> wrote in message news:18dquf8vcj3pn$.16w7fqn2hhp6o.dlg 40tude.net...Can you please alter DMD to use both sc.ini file *and* a user defined .ini file (maybe site_sc.ini) such that the definitions in the user file override the ones in sc.ini. That way, whenever you distribute a new DMD you won't wipe out my changes to sc.ini.Mark yours as read-only, and it should survive.
Sep 24 2005
On Sat, 24 Sep 2005 23:50:00 -0700, Walter Bright wrote:"Derek Parnell" <derek psych.ward> wrote in message news:18dquf8vcj3pn$.16w7fqn2hhp6o.dlg 40tude.net...But then I don't get any new things that you might have created in DMD's sc.ini file. -- Derek Parnell Melbourne, Australia 25/09/2005 5:23:34 PMCan you please alter DMD to use both sc.ini file *and* a user defined .ini file (maybe site_sc.ini) such that the definitions in the user file override the ones in sc.ini. That way, whenever you distribute a new DMD you won't wipe out my changes to sc.ini.Mark yours as read-only, and it should survive.
Sep 25 2005
"Derek Parnell" <derek psych.ward> wrote in message news:ltjlj9k2celp$.4bi3tevsw23m.dlg 40tude.net...On Sat, 24 Sep 2005 23:50:00 -0700, Walter Bright wrote:.ini"Derek Parnell" <derek psych.ward> wrote in message news:18dquf8vcj3pn$.16w7fqn2hhp6o.dlg 40tude.net...Can you please alter DMD to use both sc.ini file *and* a user definedDMDfile (maybe site_sc.ini) such that the definitions in the user file override the ones in sc.ini. That way, whenever you distribute a newI haven't changed that file in years <g>.But then I don't get any new things that you might have created in DMD's sc.ini file.you won't wipe out my changes to sc.ini.Mark yours as read-only, and it should survive.
Sep 25 2005
In article <18dquf8vcj3pn$.16w7fqn2hhp6o.dlg 40tude.net>, Derek Parnell says...Can you please alter DMD to use both sc.ini file *and* a user defined .ini file (maybe site_sc.ini) such that the definitions in the user file override the ones in sc.ini. That way, whenever you distribute a new DMD you won't wipe out my changes to sc.ini.Or if sc.ini were renamed to sc.ini.sample, and it was up to the user set up the settings if they deviate from the default sc.ini entries. That might be another solution. I hate it when I set up a custom sc.ini, then it gets overwritten when installing a new version. I've started manually telling 7-zip (the zip program that I use) to not overwrite that file, but it'd be easier in sc.ini was the first entry in the archive. Once I get past sc.ini, I get to just click "Yes to all" (or whatever it is). jcc7
Sep 25 2005
On Sat, 24 Sep 2005 17:43:51 -0700, Walter Bright wrote:Extensive update of Ddoc, www.digitalmars.com/d/ddoc.html http://www.digitalmars.com/d/changelog.html(1) There is something wrong with the .ddoc files. They seem to be completely ignored. I had to rename manual.ddoc to manual.d to get anything at all with this command line ... dmd -D -o- config.ddoc manual.ddoc (2) I don't get anything generated if the file does not contain a module statement. I was hoping to have .ddoc files that only contain documentation comments. These would be used to create End User manuals rather than documentation for developers. (3) This ... $(D_CODE $(B pragma)( $(I name) ); $(B pragma)( $(I name) , $(I option) [ $(I option) ] ); ) produced this output ... <pre class="d_code"> <b> pragma </b> ( <i> name </i> ); <b> pragma </b> ( <i> name </i> , <i> option </i> [ <i> option </i> ] ); </pre> So it seems that a lot of line breaks were inserted by DMD. (4) I want to have unmatched parenthesis inside a macro invocation. May I suggest that macro invocation can be kicked off by any sort of brackets. For example ... $(B) ${B} $[B] $<B> all invoke the B macro. Then I could do this ... $[B pragma(] name $B[);] (5) This ... Example 1 $(D_CODE // This app needs the MyGUI.lib library to be used. version(build) { pragma(link, MyGUI); } ) Example 2 $(D_CODE // This app needs the a DB library and TCP library to be used. version(build) { pragma(link, EuDB, TCP4Win); } ) produced this output ... Example 1 <pre class="d_code"> // This app needs the MyGUI.lib library to be used. version(build) { pragma(link, MyGUI); } </pre> </p> <p> Example 2 <pre class="d_code"> </pre> <p> // This app needs the a DB library and TCP library to be used. version(build) { pragma(link, EuDB, TCP4Win); } </p> -- Derek Parnell Melbourne, Australia 25/09/2005 4:51:58 PM
Sep 25 2005
"Derek Parnell" <derek psych.ward> wrote in message news:17ovuy6hovtgu.kydtinvs4pq$.dlg 40tude.net...(1) There is something wrong with the .ddoc files. They seem to be completely ignored. I had to rename manual.ddoc to manual.d to getanythingat all with this command line ... dmd -D -o- config.ddoc manual.ddocThe compiler is looking for a .d file, as it is completely built around generating documentation for a D module, which is in a .d file. All the .ddoc files are are macro definitions. Documentation is not generated from .ddoc files.(2) I don't get anything generated if the file does not contain a module statement. I was hoping to have .ddoc files that only containdocumentationcomments. These would be used to create End User manuals rather than documentation for developers.I never thought of that. But you can just put in a dummy module declaration, and then in the DDOC macro insert your own TITLE. Ddoc is built around comments being attached to declarations. Also, it'll have to be a .d file, not a .ddoc file.(3) This ... $(D_CODE $(B pragma)( $(I name) ); $(B pragma)( $(I name) , $(I option) [ $(I option) ] ); ) produced this output ... <pre class="d_code"> <b> pragma </b> ( <i> name </i> ); <b> pragma </b> ( <i> name </i> , <i> option </i> [ <i> option </i> ] ); </pre> So it seems that a lot of line breaks were inserted by DMD.Yes, that looks like a bug.(4) I want to have unmatched parenthesis inside a macro invocation. May I suggest that macro invocation can be kicked off by any sort of brackets. For example ... $(B) ${B} $[B] $<B> all invoke the B macro. Then I could do this ... $[B pragma(] name $B[);]Ok, I see what you're trying to do. Let me think about it.(5) This ... Example 1 $(D_CODE // This app needs the MyGUI.lib library to be used. version(build) { pragma(link, MyGUI); } ) Example 2 $(D_CODE // This app needs the a DB library and TCP library to be used. version(build) { pragma(link, EuDB, TCP4Win); } ) produced this output ... Example 1 <pre class="d_code"> // This app needs the MyGUI.lib library to be used. version(build) { pragma(link, MyGUI); } </pre> </p> <p> Example 2 <pre class="d_code"> </pre> <p> // This app needs the a DB library and TCP library to be used. version(build) { pragma(link, EuDB, TCP4Win); } </p>Wierd. Looks like a bug.
Sep 25 2005
"Derek Parnell" <derek psych.ward> wrote in message news:17ovuy6hovtgu.kydtinvs4pq$.dlg 40tude.net...(4) I want to have unmatched parenthesis inside a macro invocation. May I suggest that macro invocation can be kicked off by any sort of brackets. For example ... $(B) ${B} $[B] $<B> all invoke the B macro. Then I could do this ... $[B pragma(] name $B[);]The way to do this is: Macros: LPAREN = ( RPAREN=) $(B pragma $(LPAREN)) name $(B $(RPAREN);) It's not pretty, but it works.
Sep 26 2005
On Mon, 26 Sep 2005 22:44:09 -0700, Walter Bright wrote:"Derek Parnell" <derek psych.ward> wrote in message news:17ovuy6hovtgu.kydtinvs4pq$.dlg 40tude.net...Yuck! I hope this is just work around. _Ugly_ is not a good thing in documentation. -- Derek (skype: derek.j.parnell) Melbourne, Australia 27/09/2005 4:24:50 PM(4) I want to have unmatched parenthesis inside a macro invocation. May I suggest that macro invocation can be kicked off by any sort of brackets. For example ... $(B) ${B} $[B] $<B> all invoke the B macro. Then I could do this ... $[B pragma(] name $B[);]The way to do this is: Macros: LPAREN = ( RPAREN=) $(B pragma $(LPAREN)) name $(B $(RPAREN);) It's not pretty, but it works.
Sep 26 2005
"Derek Parnell" <derek psych.ward> wrote in message news:1tt8pbffpszbg$.19i0j58w3kgrb.dlg 40tude.net...On Mon, 26 Sep 2005 22:44:09 -0700, Walter Bright wrote:At one level I agree with you, at the other I'm worried about too many features that wind up stepping on each other, like the blank line problem in another message.The way to do this is: Macros: LPAREN = ( RPAREN=) $(B pragma $(LPAREN)) name $(B $(RPAREN);) It's not pretty, but it works.Yuck! I hope this is just work around. _Ugly_ is not a good thing in documentation.
Sep 26 2005
"Derek Parnell" <derek psych.ward> wrote in message news:17ovuy6hovtgu.kydtinvs4pq$.dlg 40tude.net...(3) This ... $(D_CODE $(B pragma)( $(I name) ); $(B pragma)( $(I name) , $(I option) [ $(I option) ] ); ) produced this output ... <pre class="d_code"> <b> pragma </b> ( <i> name </i> ); <b> pragma </b> ( <i> name </i> , <i> option </i> [ <i> option </i> ] ); </pre> So it seems that a lot of line breaks were inserted by DMD.I've got this one fixed now.(5) This ... Example 1 $(D_CODE // This app needs the MyGUI.lib library to be used. version(build) { pragma(link, MyGUI); } ) Example 2 $(D_CODE // This app needs the a DB library and TCP library to be used. version(build) { pragma(link, EuDB, TCP4Win); } ) produced this output ... Example 1 <pre class="d_code"> // This app needs the MyGUI.lib library to be used. version(build) { pragma(link, MyGUI); } </pre> </p> <p> Example 2 <pre class="d_code"> </pre> <p> // This app needs the a DB library and TCP library to be used. version(build) { pragma(link, EuDB, TCP4Win); } </p>This happens because of the order of evaluation. Macro processing is the last thing done. In the meantime, the blank line in Example 2 is seen as a paragraph break, so the first part is wrapped in $(P first part) and the second part in $(P second part). This gives the behavior you're seeing. If you want to have blank lines in a macro argument, I don't have a good solution at the moment. Counting parentheses is not a very good option, as there are the issues with unmatched parentheses in strings, comments, or just random text.
Sep 26 2005
On Mon, 26 Sep 2005 23:36:16 -0700, Walter Bright wrote:"Derek Parnell" <derek psych.ward> wrote in message news:17ovuy6hovtgu.kydtinvs4pq$.dlg 40tude.net...Okay, so the work around is something like ... Example 1 $(D_CODE // This app needs the MyGUI.lib library to be used. ) $(D_CODE version(build) { pragma(link, MyGUI); } ) Example 2 $(D_CODE // This app needs the a DB library and TCP library to be used. ) $(D_CODE version(build) { pragma(link, EuDB, TCP4Win); } ) Not pretty, and defeats the purpose of having a 'pre-formatted' section. Maybe you need to have a non-macro solution to this. How about if when a macro invocation takes the form "$(macroname" and is the entire line, then the end of the invocation is a line consisting of a single ")". That would not require bracket counting and I've used this method in my own macro processor successfully. -- Derek (skype: derek.j.parnell) Melbourne, Australia 27/09/2005 5:30:01 PM(3) This ... $(D_CODE $(B pragma)( $(I name) ); $(B pragma)( $(I name) , $(I option) [ $(I option) ] ); ) produced this output ... <pre class="d_code"> <b> pragma </b> ( <i> name </i> ); <b> pragma </b> ( <i> name </i> , <i> option </i> [ <i> option </i> ] ); </pre> So it seems that a lot of line breaks were inserted by DMD.I've got this one fixed now.(5) This ... Example 1 $(D_CODE // This app needs the MyGUI.lib library to be used. version(build) { pragma(link, MyGUI); } ) Example 2 $(D_CODE // This app needs the a DB library and TCP library to be used. version(build) { pragma(link, EuDB, TCP4Win); } ) produced this output ... Example 1 <pre class="d_code"> // This app needs the MyGUI.lib library to be used. version(build) { pragma(link, MyGUI); } </pre> </p> <p> Example 2 <pre class="d_code"> </pre> <p> // This app needs the a DB library and TCP library to be used. version(build) { pragma(link, EuDB, TCP4Win); } </p>This happens because of the order of evaluation. Macro processing is the last thing done. In the meantime, the blank line in Example 2 is seen as a paragraph break, so the first part is wrapped in $(P first part) and the second part in $(P second part). This gives the behavior you're seeing. If you want to have blank lines in a macro argument, I don't have a good solution at the moment. Counting parentheses is not a very good option, as there are the issues with unmatched parentheses in strings, comments, or just random text.
Sep 27 2005
"Derek Parnell" <derek psych.ward> wrote in message > How about if when a macro invocation takes the form "$(macroname" and isthe entire line, then the end of the invocation is a line consisting of a single ")". That would not require bracket counting and I've used this method in my own macro processor successfully.It might work, but I'm not sure. The fundamental problem is that the 'highlighter' is trying to highlight your code along with your own formatting and highlighting. There are bound to be conflicts. I think the most practical solution would be to have special sections that are not touched by the highlighter. Sort of like how the ---- delimited code sections get a separate and distinct highlighter applied to them.
Sep 27 2005
"Derek Parnell" <derek psych.ward> wrote in message news:tc69ho4jyzx2.1oozf8r2g2yhz$.dlg 40tude.net...Okay, so the work around is something like ... Example 1 $(D_CODE // This app needs the MyGUI.lib library to be used. ) $(D_CODE version(build) { pragma(link, MyGUI); } ) Example 2 $(D_CODE // This app needs the a DB library and TCP library to beused. )$(D_CODE version(build) { pragma(link, EuDB, TCP4Win); } )You could also do: Example 2 $(D_CODE $(BR) // This app needs the a DB library and TCP library to be used. version(build) { pragma(link, EuDB, TCP4Win); } )
Sep 27 2005
Walter Bright wrote:Extensive update of Ddoc, www.digitalmars.com/d/ddoc.html http://www.digitalmars.com/d/changelog.htmlI see you're gradually getting back into working on the compiler itself. Has this come your way? http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/28426 And waiting on pending peeves is getting tiring again. It would be helpful if you gave feedback on the progress reviews at least from time to time. The most recent one is here: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/28449 Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- C++ a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Sep 26 2005
Sorry. I want to get Ddoc in a usable state, then I'll turn back to the usual bug fixing in D.
Sep 26 2005
Walter Bright wrote:Sorry. I want to get Ddoc in a usable state, then I'll turn back to the usual bug fixing in D.Walter's gotta have his fun, guys! I would get so burned out fixing bug after bug after bug.
Sep 26 2005
dmd.133 breaks nested functions in some weird way :( I haven't been unable to isolate a test case yet, but it causes Access Violations in places where they make no sense. I'll try to send a test case, but the code that caused that AVs ripped out of a larger program worked fine. My program wasn't the only one that experienced that same problem.
Sep 26 2005
Tom S wrote:dmd.133 breaks nested functions in some weird way :( I haven't been unable to isolate a test case yet, but it causes Access Violations in places where they make no sense. I'll try to send a test case, but the code that caused that AVs ripped out of a larger program worked fine. My program wasn't the only one that experienced that same problem.Weird. The changelog doesn't say anything about nested functions. But I have an impression that Walter did't always list all the major changes. For example, some int types are replaced by size_t in Phobos since dmd 0.133 without a note in the changelog. That unexpectedly breaks existing code, by the way.
Sep 26 2005
"zwang" <nehzgnaw gmail.com> wrote in message news:dh94fa$1gg9$1 digitaldaemon.com...Weird. The changelog doesn't say anything about nested functions.I didn't change anything with nested functions.But I have an impression that Walter did't always list all the major changes. For example, some int types are replaced by size_t in Phobos since dmd 0.133 without a note in the changelog. That unexpectedly breaks existing code, by the way.I don't see how it can?
Sep 26 2005
On Mon, 26 Sep 2005 08:59:08 -0700, Walter Bright <newshound digitalmars.com> wrote:"zwang" <nehzgnaw gmail.com> wrote in message news:dh94fa$1gg9$1 digitaldaemon.com...I suspect zwang is referring to the std.string.find bug reported recently which now uses a size_t, so... int find(char[] s, char[] sub) where s = "a" and sub = "abc" .. size_t sublength = sub.length; ... size_t imax = s.length - sublength + 1; gives imax == a very large _positive_ number. No? ReganWeird. The changelog doesn't say anything about nested functions.I didn't change anything with nested functions.But I have an impression that Walter did't always list all the major changes. For example, some int types are replaced by size_t in Phobos since dmd 0.133 without a note in the changelog. That unexpectedly breaks existing code, by the way.I don't see how it can?
Sep 26 2005
Regan Heath wrote:On Mon, 26 Sep 2005 08:59:08 -0700, Walter Bright <newshound digitalmars.com> wrote:That's the bug I was referring to. Has anyone reviewed other Phobos functions that might also be affected by this signed-to-unsigned change?"zwang" <nehzgnaw gmail.com> wrote in message news:dh94fa$1gg9$1 digitaldaemon.com...I suspect zwang is referring to the std.string.find bug reported recently which now uses a size_t, so... int find(char[] s, char[] sub) where s = "a" and sub = "abc" .. size_t sublength = sub.length; ... size_t imax = s.length - sublength + 1; gives imax == a very large _positive_ number. No? ReganWeird. The changelog doesn't say anything about nested functions.I didn't change anything with nested functions.But I have an impression that Walter did't always list all the major changes. For example, some int types are replaced by size_t in Phobos since dmd 0.133 without a note in the changelog. That unexpectedly breaks existing code, by the way.I don't see how it can?
Sep 26 2005
On Tue, 27 Sep 2005 12:51:00 +1200, Regan Heath wrote:On Mon, 26 Sep 2005 08:59:08 -0700, Walter Bright <newshound digitalmars.com> wrote:Exactly my point I just posted. This really should be long imax = s.length - sublength + 1; And then deal with situations where imax <= 0; -- Derek (skype: derek.j.parnell) Melbourne, Australia 27/09/2005 11:13:34 AM"zwang" <nehzgnaw gmail.com> wrote in message news:dh94fa$1gg9$1 digitaldaemon.com...I suspect zwang is referring to the std.string.find bug reported recently which now uses a size_t, so... int find(char[] s, char[] sub) where s = "a" and sub = "abc" .. size_t sublength = sub.length; ... size_t imax = s.length - sublength + 1; gives imax == a very large _positive_ number. No?Weird. The changelog doesn't say anything about nested functions.I didn't change anything with nested functions.But I have an impression that Walter did't always list all the major changes. For example, some int types are replaced by size_t in Phobos since dmd 0.133 without a note in the changelog. That unexpectedly breaks existing code, by the way.I don't see how it can?
Sep 26 2005
"Regan Heath" <regan netwin.co.nz> wrote in message news:opsxqknapw23k2f5 nrage.netwin.co.nz...I suspect zwang is referring to the std.string.find bug reported recently which now uses a size_t, so... int find(char[] s, char[] sub) where s = "a" and sub = "abc" .. size_t sublength = sub.length; ... size_t imax = s.length - sublength + 1; gives imax == a very large _positive_ number. No?Oops!
Sep 26 2005
"Walter Bright" <newshound digitalmars.com> wrote in news:dhapsq$2u9a$3 digitaldaemon.com:"Regan Heath" <regan netwin.co.nz> wrote in message news:opsxqknapw23k2f5 nrage.netwin.co.nz...Oops = Objectoriented outragious programming solution [G] JanI suspect zwang is referring to the std.string.find bug reported recently which now uses a size_t, so... int find(char[] s, char[] sub) where s = "a" and sub = "abc" .. size_t sublength = sub.length; ... size_t imax = s.length - sublength + 1; gives imax == a very large _positive_ number. No?Oops!
Sep 27 2005
On Mon, 26 Sep 2005 08:59:08 -0700, Walter Bright wrote:"zwang" <nehzgnaw gmail.com> wrote in message news:dh94fa$1gg9$1 digitaldaemon.com...You're kidding, right? Changing a parameter from a signed type to an unsigned type has got to have an impact, especially as DMD doesn't complain about implicit conversions between them. Remember that negative values in 'int' types appear to be positive values in 'uint' types. Whenever you calculate the difference between to numbers the result must be assumed to be a signed value. -- Derek (skype: derek.j.parnell) Melbourne, Australia 27/09/2005 11:05:37 AMWeird. The changelog doesn't say anything about nested functions.I didn't change anything with nested functions.But I have an impression that Walter did't always list all the major changes. For example, some int types are replaced by size_t in Phobos since dmd 0.133 without a note in the changelog. That unexpectedly breaks existing code, by the way.I don't see how it can?
Sep 26 2005