Mercurial > projects > dstress
view run/c/const_45_A.d @ 1630:d0efa3ae5522 default tip
run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sat, 23 Apr 2011 22:57:32 +0200 |
parents | abcf8e538bac |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Bill Baxter <dnewsgroup@billbaxter.com> // @date@ 2007-02-16 // @uri@ http://www.digitalmars.com/webnews/newsgroups.php?group=digitalmars.D&article_id=48869 // @desc@ Re: Compile time function execution... module dstress.run.c.const_45_A; char[] UpToSpace(char[] x){ int i=0; while (i<x.length && x[i] != ' ') { i++; } return x[0..i]; } int main(){ const y = UpToSpace("first space was after first"); if("first" != y){ assert(0); } return 0; }