About: Source:Hack 1.0/rnd.c   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

Below is the full text to rnd.c from the source code of Hack 1.0. To link to a particular line, write [[Hack 1.0/rnd.c#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code. The Usenet post in which this file was originally distributed is not archived at Google Groups. No copy is known to be publicly available. This file is reconstructed from later versions and may not match the original distribution exactly.

AttributesValues
rdfs:label
  • Source:Hack 1.0/rnd.c
rdfs:comment
  • Below is the full text to rnd.c from the source code of Hack 1.0. To link to a particular line, write [[Hack 1.0/rnd.c#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code. The Usenet post in which this file was originally distributed is not archived at Google Groups. No copy is known to be publicly available. This file is reconstructed from later versions and may not match the original distribution exactly.
dcterms:subject
dbkwik:nethack/pro...iPageUsesTemplate
abstract
  • Below is the full text to rnd.c from the source code of Hack 1.0. To link to a particular line, write [[Hack 1.0/rnd.c#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code. The Usenet post in which this file was originally distributed is not archived at Google Groups. No copy is known to be publicly available. This file is reconstructed from later versions and may not match the original distribution exactly. 1. #define RND(x) ((rand()>>3) % x) 2. 3. rn1(x,y) 4. register int x,y; 5. { 6. return(RND(x)+y); 7. } 8. 9. rn2(x) 10. register int x; 11. { 12. return(RND(x)); 13. } 14. 15. rnd(x) 16. register int x; 17. { 18. return(RND(x)+1); 19. } 20. 21. d(n,x) 22. register int n,x; 23. { 24. register int tmp = n; 25. 26. while(n--) tmp += RND(x); 27. return(tmp); 28. }
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software