www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - DMD 0.132 release

reply "Walter Bright" <newshound digitalmars.com> writes:
Extensive update of Ddoc, www.digitalmars.com/d/ddoc.html

http://www.digitalmars.com/d/changelog.html
Sep 24 2005
next sibling parent Vathix <chris dprogramming.com> writes:
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.html

DMD 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
prev sibling next sibling parent reply Rod Haper <rhaper houston.rr.com> writes:
Walter Bright wrote:
 Extensive update of Ddoc, www.digitalmars.com/d/ddoc.html
 
 http://www.digitalmars.com/d/changelog.html
 
 

Ummm ... 0.133 - right? The Change Log also says 0.132 but links to 0.133.
Sep 24 2005
parent "Walter Bright" <newshound digitalmars.com> writes:
"Rod Haper" <rhaper houston.rr.com> wrote in message
news:dh5184$13gv$1 digitaldaemon.com...
 Ummm ... 0.133 - right?

Yes. Fixed.
Sep 24 2005
prev sibling next sibling parent David L. Davis <SpottedTiger yahoo.com> writes:
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.html

Walter, 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. # 1) I'd like to keep the 'in' in, and one whitespace after the comma (please) # ulong gcf(in ulong ulA, in ulong ulB) # becomes: # ulong gcf(ulong ulA,ulong ulB); # 2) I would also like for my bool to stay, and not have it replaced with bit # bool isprime(ulong ulz) # becomes: # bit isprime(ulong ulz); # 3) And lastly, it seems that any string that matchs the module name, in # this case "mathext" gets changed to having two leading spaces and # the whole string then underlined. # # "C:\dmd>bin\dmd mathext.d -debug=mathext -unittest" # becomes: # "C:\dmd>bin\dmd __mathext.d -debug=__mathext -unittest" 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
prev sibling next sibling parent reply Derek Parnell <derek psych.ward> writes:
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
next sibling parent reply "Walter Bright" <newshound digitalmars.com> writes:
"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
parent reply Derek Parnell <derek psych.ward> writes:
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...
 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.

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 PM
Sep 25 2005
parent "Walter Bright" <newshound digitalmars.com> writes:
"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:

 "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



 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



 you won't wipe out my changes to sc.ini.

Mark yours as read-only, and it should survive.

But then I don't get any new things that you might have created in DMD's sc.ini file.

I haven't changed that file in years <g>.
Sep 25 2005
prev sibling parent J C Calvarse <technocrat7 gmail.com> writes:
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
prev sibling next sibling parent reply Derek Parnell <derek psych.ward> writes:
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
next sibling parent "Walter Bright" <newshound digitalmars.com> writes:
"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 get

 at all with this command line ...

    dmd -D -o- config.ddoc manual.ddoc

The 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 contain

 comments. 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
prev sibling next sibling parent reply "Walter Bright" <newshound digitalmars.com> writes:
"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
parent reply Derek Parnell <derek psych.ward> writes:
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...
 (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.

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
Sep 26 2005
parent "Walter Bright" <newshound digitalmars.com> writes:
"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:
 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.

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.
Sep 26 2005
prev sibling parent reply "Walter Bright" <newshound digitalmars.com> writes:
"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
parent reply Derek Parnell <derek psych.ward> writes:
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...
 (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.

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
Sep 27 2005
next sibling parent "Walter Bright" <newshound digitalmars.com> writes:
"Derek Parnell" <derek psych.ward> wrote in message > 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.

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
prev sibling parent "Walter Bright" <newshound digitalmars.com> writes:
"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 be

   $(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
prev sibling next sibling parent reply Stewart Gordon <smjg_1998 yahoo.com> writes:
Walter Bright wrote:
 Extensive update of Ddoc, www.digitalmars.com/d/ddoc.html
 
 http://www.digitalmars.com/d/changelog.html

I see you're gradually getting back into working on the compiler itself. Has this come your way? 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: 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
parent reply "Walter Bright" <newshound digitalmars.com> writes:
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
parent James Dunne <james.jdunne gmail.com> writes:
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
prev sibling parent reply Tom S <Tom_member pathlink.com> writes:
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
parent reply zwang <nehzgnaw gmail.com> writes:
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
parent reply "Walter Bright" <newshound digitalmars.com> writes:
"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
next sibling parent reply "Regan Heath" <regan netwin.co.nz> writes:
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...
 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?

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? Regan
Sep 26 2005
next sibling parent zwang <nehzgnaw gmail.com> writes:
Regan Heath wrote:
 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...

 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?

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? Regan

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?
Sep 26 2005
prev sibling next sibling parent Derek Parnell <derek psych.ward> writes:
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:
 "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?

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?

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
Sep 26 2005
prev sibling parent reply "Walter Bright" <newshound digitalmars.com> writes:
"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
parent Jan Ole Andreasen <janole jubiipost.dk> writes:
"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...
 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!

Oops = Objectoriented outragious programming solution [G] Jan
Sep 27 2005
prev sibling parent Derek Parnell <derek psych.ward> writes:
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...
 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?

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 AM
Sep 26 2005