SlipDink's Profile
They once paid me to code for a living. But I'd rather 'dink around' all day.
Okay, so toof.c (see this below variant of your DinkC code), now runs in DinkC; but how do we set, reset and test various bits within a DinkC integer using your code? I must be missing something here.
For example, if we set &status_bd to 12 and pass in the value 8 as the &counter parameter, it would be nice if we got back some indication that the "bit 3 (value 8)" is set in &status_bd. We invoked "external("toof", "binary", 8);". Below are the results we find in DEBUG.TXT.
If we do the same thing for &status_bd (setting it to 12) and invoke "" and then check "bit 3 (value 8)", we get results like those show below which tells us that bit 8 is set, as we would expect.
// This is a variant of toof's DinkC "simple do-while loop" DinkC code: void binary() { int &counter = &arg1; debug("toof: counter=&counter; status_bd=&status_bd"); int &crap = &status_bd; // For my tests, I used &status_bd as the global variable. // Since it is accessible everywhere, it is not passed in. loop: if(&counter > 0) { &crap / 2; // I assumed you meant to use the passed in value &counter // here, not the (apparently undeclared) value &count. &counter -= 1; debug("toof: counter=&counter; crap=&crap"); wait(200); goto loop; } else { // I found the DinkC modulo math function in // the "DinkC Reference v4.0" help file! I also // changed the code to return a value via normal // DinkC methods instead of the slightly more // efficient method (but *somewhat* less safe (?) // if more than one script is calling this code at // about the same time?) of using a global to // return the value. &crap = math_mod(&crap); return(&crap); } }
For example, if we set &status_bd to 12 and pass in the value 8 as the &counter parameter, it would be nice if we got back some indication that the "bit 3 (value 8)" is set in &status_bd. We invoked "external("toof", "binary", 8);". Below are the results we find in DEBUG.TXT.
Dink:toof: counter=8; status_bd=12 Dink:toof: counter=7; crap=6 Dink:toof: counter=6; crap=3 Dink:toof: counter=5; crap=1 Dink:toof: counter=4; crap=0 Dink:toof: counter=3; crap=0 Dink:toof: counter=2; crap=0 Dink:toof: counter=1; crap=0 Dink:toof: counter=0; crap=0
If we do the same thing for &status_bd (setting it to 12) and invoke "" and then check "bit 3 (value 8)", we get results like those show below which tells us that bit 8 is set, as we would expect.
Dink:CHKBIT: do operation(-1) on bd=12(2: status_bd) using which=8) Dink:CHKBIT: do operation(-1) using which=8; wrkbit=1073741824) Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=536870912 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=268435456 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=134217728 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=67108864 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=33554432 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=16777216 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=8388608 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=4194304 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=2097152 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=1048576 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=524288 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=262144 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=131072 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=65536 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=32768 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=16384 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=8192 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=4096 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=2048 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=1024 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=512 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=256 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=128 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=64 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=32 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=16 Dink:CHKBIT: op:-1 --> bs=12; which=8; wrkbit=8 Dink:CHKBIT: op:query --> bit 8 was found set in 12. Dink:CHKBIT: done
SlipDink has released 8 files
Title | Category | Avg | Updated |
---|---|---|---|
A Little Adventure | D-Mod, Romp | N/A | August 2nd, 2023 |
Periculo Island | D-Mod, Quest | N/A | May 20th, 2023 |
Checkbit | Development, Source | N/A | June 21st, 2022 |
All that Glitters! | D-Mod, Quest | ![]() | February 26th, 2021 |
Before... | D-Mod, Quest | N/A | April 13th, 2020 |
Crowns of Stone | D-Mod, Quest | ![]() | March 8th, 2020 |
THE LAST QUEST (part 2): The Iron Ring of Destiny | D-Mod, Quest | ![]() | December 7th, 2019 |
The Last Quest Part 1: The Oraculum | D-Mod, Romp | ![]() | December 4th, 2019 |
SlipDink has written 5 reviews
Title | File | Type | Score | Date |
---|---|---|---|---|
The best that can fairly be said about this dmod. | An Ancient Voice: A Tale of Four Sorrows | Normal | ![]() | September 19th, 2020 |
The Golden Duck is a bar I'd like to visit more often! | Golden Duck | Normal | ![]() | December 5th, 2018 |
Great game in the spirit of Bloop! | Bloop's Purpoise | Normal | ![]() | June 19th, 2017 |
The 2nd best entry in the June 2017 Bloop the Fish contest! | Another Fish Named Bloop | Normal | ![]() | June 19th, 2017 |
An entertaining, though somewhat flawed effort | The Black Skull | Featured | ![]() | November 14th, 2016 |
SlipDink has taken 11 screenshots
Screenshot | File | Date |
---|---|---|
![]() |
Before... | April 29th, 2019 |
![]() |
Before... | April 29th, 2019 |
![]() |
Before... | April 29th, 2019 |
![]() |
Cloud Castle | October 24th, 2016 |
![]() |
Cloud Castle | October 24th, 2016 |
![]() |
Cloud Castle | October 24th, 2016 |
![]() |
Cloud Castle | October 24th, 2016 |
![]() |
The Last Quest Part 1: The Oraculum | October 2nd, 2016 |
![]() |
The Last Quest Part 1: The Oraculum | September 30th, 2016 |
![]() |
The Last Quest Part 1: The Oraculum | September 30th, 2016 |
![]() |
The Last Quest Part 1: The Oraculum | September 30th, 2016 |