Check out the TB2K CHATROOM, open 24/7               Configuring Your Preferences for OPTIMAL Viewing
  To access our Email server, CLICK HERE

  If you are unfamiliar with the Guidelines for Posting on TB2K please read them.      ** LINKS PAGE **



*** Help Support TB2K ***
via mail, at TB2K Fund, P.O. Box 24, Coupland, TX, 78615
or


TECH (one of) My dog's life in BASIC
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 40 of 51
  1. #1

    (one of) My dog's life in BASIC

    1. Sleep
    2. If not 6 am, goto 1
    3. Gosub 12
    4. If not time for dinner, goto 3
    5. Pee
    6. Eat dinner
    7. Poop
    8. Gosub 12
    9. If not 11 pm, goto 8
    10. Drink some water
    11. Goto 1
    12. Pee
    13. Drink some water
    14. Sleep for 2 hours
    15. Return

  2. #2
    Join Date
    May 2001
    Location
    Behind Enemy Lines
    Posts
    156,348
    Lines are numbered by 10's traditionally...

  3. #3
    Join Date
    Jul 2004
    Location
    State of confusion
    Posts
    5,283
    I’m guessing you would not have duplicate numbers?
    "...Cry 'Havoc' and let slip the cats of war..."
    Razor sharpening while you wait - Occam
    If it works, it doesn't have enough features. - Windows 10 design philosophy.
    Forget the beer, I'm just here for the doom!
    Humans, just a tool for amino acids to make Swiss watches.

  4. #4
    Join Date
    May 2001
    Location
    Behind Enemy Lines
    Posts
    156,348
    Your BASIC is way too old. Let me help:


    Code:
    DO WHILE 1 = 1
            Sleep
    
            If not (6 am) THEN LOOP
    
            GOSUB MyLoop
    
            If not (time for dinner) THEN GOSUB MyLoop
    
            Pee
            Eat dinner
            Poop
    
            GOSUB MyLoop
    
            If not (11 pm) THEN GOSUB MyLoop
    
            Drink some water
    LOOP
    
    MyLoop:
    
            Pee
            Drink some water
            Sleep for 2 hours
    
            Return
    
    END

  5. #5
    I don't know basic
    So
    My dog's life: ball. Sleep. Ball. Eat. Ball. Poop. Pee. Ball

    Actually he can sleep, poop and pee with the ball in his mouth. Eating he has to at least set the ball down for a bit.

  6. #6
    Quote Originally Posted by Dennis Olson View Post
    Lines are numbered by 10's traditionally...
    Forum lists are not.

  7. #7
    Lali resembles this post. I bought her a Kong bone with hollow places in the ends to put treats. She gets the treats out and will fall asleep with the bone in her mouth. She finally got the harness and the long lead figured out this morning. Run in a Biiigggg circle as fast as she can- with a small Cedar branch clutched in her teeth- that's the outside chew toy. She runs until she has to GOSUB MyLoop If not (11 pm) THEN GOSUB MyLoop again. Silly pup.
    No one ever rescues an old dog. They lay in a cage until they die. PLEASE save one. None of us wants to die cold and alone... --Dennis Olson

    Mo is my One.

  8. #8
    Quote Originally Posted by FaithfulSkeptic View Post
    1. Sleep
    2. If not 6 am, goto 1
    3. Gosub 12
    4. If not time for dinner, goto 3
    5. Pee
    6. Eat dinner
    7. Poop
    8. Gosub 12
    9. If not 11 pm, goto 8
    10. Drink some water
    11. Goto 1
    12. Pee
    13. Drink some water
    14. Sleep for 2 hours
    15. Return


    FaithfulSkeptic, I hope all your pups are well !

    Regards, No Dandy !!!


  9. #9
    Join Date
    Jul 2004
    Location
    State of confusion
    Posts
    5,283
    http://www.funnyordie.com/articles/5...nd-dog-s-diary

    The ever popular pet’s diary,
    Sorry no C&P from my phone, someone feel free to post the text.
    "...Cry 'Havoc' and let slip the cats of war..."
    Razor sharpening while you wait - Occam
    If it works, it doesn't have enough features. - Windows 10 design philosophy.
    Forget the beer, I'm just here for the doom!
    Humans, just a tool for amino acids to make Swiss watches.

  10. #10
    Quote Originally Posted by NoDandy View Post
    FaithfulSkeptic, I hope all your pups are well !

    Regards, No Dandy !!!

    They're getting old. We have (had) two pugs, and another schnauzer mix we adopted from my MIL when she went into assisted living. Zoe, the older of the two pugs, was 15 and went over the rainbow this June. Pepper (the other pug) is 14, and while she's healthy is definitely slowing down ... going deaf and sleeps more and more, but still has her bouts of feistiness. Skip, the inherited MIL dog, is blind and deaf and is the source of the BASIC program. The poor dumb thing has no life at all, is having more and more trouble climbing the steps, and soon I fear will need to depart.

    My wife say after these, no more. I give her less than a year before a new pug puppy shows up. They are without question the cutest, friendliest dogs with the best disposition ... to me anyway.

  11. #11
    I tried to C&P, but could not get it to work. It really is cute !

  12. #12
    Join Date
    Jan 2012
    Location
    FEMA Region 6
    Posts
    5,612
    I cut my teeth on BASIC back in the day.

  13. #13
    Quote Originally Posted by FaithfulSkeptic View Post
    They're getting old. We have (had) two pugs, and another schnauzer mix we adopted from my MIL when she went into assisted living. Zoe, the older of the two pugs, was 15 and went over the rainbow this June. Pepper (the other pug) is 14, and while she's healthy is definitely slowing down ... going deaf and sleeps more and more, but still has her bouts of feistiness. Skip, the inherited MIL dog, is blind and deaf and is the source of the BASIC program. The poor dumb thing has no life at all, is having more and more trouble climbing the steps, and soon I fear will need to depart.

    My wife say after these, no more. I give her less than a year before a new pug puppy shows up. They are without question the cutest, friendliest dogs with the best disposition ... to me anyway.

    Sorry to hear of their deteriorating health, and your recent loss. We have had as many as five, various breeds, German Shepard, Labs, Border Collies, Australian Shepherd/ Husky mix, and a Great Pyrenees . We lost our beagle year ago . We are now down to two, a fiesty 5 yr old Lab, and a 6 yr old Chow mix. Loved all those that are gone, and love the two remaining. Also have 4 cats. We like animals. We either rescue from the shelter, or adopt strays that wander in. God only loans them to us for a short while. Wish He would let us keep them longer !

    never had a pug, always heard good about them.

    Redgards, No Dandy


  14. #14
    Join Date
    May 2001
    Location
    Behind Enemy Lines
    Posts
    156,348
    FS, you gotta find a "Hairy" pup. This little guy is absolutely the friendliest dog I've ever been around in my life. Loves everyone and everything. Goes zooming up to strangers for attention, then flops over against them for a tummy rub. Shepherds just aren't like that. It's been an adjustment for me (and he's driving Aja to absolute distraction.)

  15. #15
    Join Date
    Aug 2011
    Location
    Southeast Virginia
    Posts
    392
    Quote Originally Posted by Dennis Olson View Post
    Your BASIC is way too old. Let me help:


    Code:
    DO WHILE 1 = 1
            Sleep
    
            If not (6 am) THEN LOOP
    
            GOSUB MyLoop
    
            If not (time for dinner) THEN GOSUB MyLoop
    
            Pee
            Eat dinner
            Poop
    
            GOSUB MyLoop
    
            If not (11 pm) THEN GOSUB MyLoop
    
            Drink some water
    LOOP
    
    MyLoop:
    
            Pee
            Drink some water
            Sleep for 2 hours
    
            Return
    
    END
    Where are you variables defined?
    Ezra 9:3
    "When I heard this, I tore my tunic and cloak, pulled hair from my head and beard and sat down appalled"

  16. #16
    Join Date
    May 2001
    Location
    Behind Enemy Lines
    Posts
    156,348
    Hey, this isn't my app! I'm just cleaning up the syntax!


    Maybe I should re-write it in C#? Perhaps as an Interface?


    But what pattern should I use?

  17. #17
    Join Date
    Aug 2011
    Location
    Southeast Virginia
    Posts
    392
    If I could only remember my APL!
    Ezra 9:3
    "When I heard this, I tore my tunic and cloak, pulled hair from my head and beard and sat down appalled"

  18. #18
    Join Date
    May 2001
    Location
    Behind Enemy Lines
    Posts
    156,348
    Maybe some RPG3?

  19. #19
    Join Date
    Jul 2004
    Location
    State of confusion
    Posts
    5,283
    Quote Originally Posted by NoDandy View Post
    I tried to C&P, but could not get it to work. It really is cute !
    Search for an exact phrase like day xxx of my captivity will give you more choices, I just don’t have the time.
    "...Cry 'Havoc' and let slip the cats of war..."
    Razor sharpening while you wait - Occam
    If it works, it doesn't have enough features. - Windows 10 design philosophy.
    Forget the beer, I'm just here for the doom!
    Humans, just a tool for amino acids to make Swiss watches.

  20. #20
    Quote Originally Posted by Dennis Olson View Post
    Maybe I should re-write it in C#? Perhaps as an Interface?
    In Skip's case, it would be a static class and the Pee() method would be invoked at ThreadPriority.Highest. The invocation would take a snapshot of the diagnostic timer and if execution latency exceeds 5 seconds, would defer to the PeeOnFloor() method.

  21. #21
    Join Date
    May 2001
    Location
    Behind Enemy Lines
    Posts
    156,348
    Wouldn’t the PeeOnFloor method be more of an override of the Pee() method, where bool “onFloor=True” is passed?

  22. #22
    Quote Originally Posted by Dennis Olson View Post
    Wouldn’t the PeeOnFloor method be more of an override of the Pee() method, where bool “onFloor=True” is passed?
    Perhaps an event whose delegate is reassigned based on Skip.age

  23. #23
    Quote Originally Posted by NCGirl View Post
    I don't know basic
    So
    My dog's life: ball. Sleep. Ball. Eat. Ball. Poop. Pee. Ball

    Actually he can sleep, poop and pee with the ball in his mouth. Eating he has to at least set the ball down for a bit.

    lol!
    Ginger

  24. #24
    Join Date
    May 2001
    Location
    Behind Enemy Lines
    Posts
    156,348
    Quote Originally Posted by FaithfulSkeptic View Post
    Perhaps an event whose delegate is reassigned based on Skip.age
    We’ve been doing this stuff WAY too long....

  25. #25
    Join Date
    May 2001
    Location
    Behind Enemy Lines
    Posts
    156,348
    I’m sorry, an overload. I gotta get my head back into C#

  26. #26
    I do enjoy C#. It's how a language should work. Just wish I could have something similar for embedded devel with some of the C# features ... as opposed to using 70's vintage C, or the creeping elegance quagmire that C++ has become.

  27. #27
    Join Date
    Jul 2004
    Location
    State of confusion
    Posts
    5,283
    I’ve had a smidge of BASIC, did a little hand work in Z-80 assembly with a hand wired interface, programmed a 2708 with a hand wired program board, using cannabilized calculator keys on a hand etched circuit board with a hand wired power supply of +5, +12, -5, and the +26 programming pulse. I’m a hands on guy. Way out of date, though.
    This is fun to read, carry on.
    "...Cry 'Havoc' and let slip the cats of war..."
    Razor sharpening while you wait - Occam
    If it works, it doesn't have enough features. - Windows 10 design philosophy.
    Forget the beer, I'm just here for the doom!
    Humans, just a tool for amino acids to make Swiss watches.

  28. #28
    Can ya'll get back to talking about dogs please? I have no idea what is being discussed here!


  29. #29
    Join Date
    Aug 2011
    Location
    Southeast Virginia
    Posts
    392
    Nerds.

    Just sayin.....
    Ezra 9:3
    "When I heard this, I tore my tunic and cloak, pulled hair from my head and beard and sat down appalled"

  30. #30
    Quote Originally Posted by NCGirl View Post
    Can ya'll get back to talking about dogs please? I have no idea what is being discussed here!

    NCGirl, Iím right there with you! Two degrees behind my name and I donít have a clue what theyí talking about! lol
    Ginger

  31. #31
    Quote Originally Posted by Tennessee gal View Post
    NCGirl, I’m right there with you! Two degrees behind my name and I don’t have a clue what they’ talking about! lol
    I'm a software designer, it's what I was doing when the dog interrupted, and the time before. The basic program in the OP describes him perfectly. You don't need a degree to understand it.

  32. #32
    Ohhh.. this is nice. Reminds me of ForTran worksheets, TI-BASIC and pascal.... too bad I can't remember a tenth of it... hmm.. a hundredth? Hmm.. 'out of memory' indeed...
    "If it be possible, as much as lieth in you, live peaceably with all men." Romans 12:18 KJV

  33. #33
    Quote Originally Posted by Tennessee gal View Post
    NCGirl, I’m right there with you! Two degrees behind my name and I don’t have a clue what they’ talking about! lol
    Me too! I do know this- what these nerds do beats working out under the sun hands down, especially as they age.

    Lali Kong update- the thing lasted two days. Sigh. Vet reccomended something called a Goughnut. At least she doesn't pee on the floor anymore (Lali; not the Vet).
    No one ever rescues an old dog. They lay in a cage until they die. PLEASE save one. None of us wants to die cold and alone... --Dennis Olson

    Mo is my One.

  34. #34
    Join Date
    May 2001
    Location
    Behind Enemy Lines
    Posts
    156,348
    I've loaded the house with toys and chew-treats. Hairy is surrounded by stuff that he can use to exercise his need to chew. Both the toys and Cherie’s are consumed of course, so I get more. Some dogs have such bite force that nothing can withstand it, so it’s not worth trying. Just keep the house stocked and you’re golden.

  35. #35
    Quote Originally Posted by Dennis Olson View Post
    I've loaded the house with toys and chew-treats. Hairy is surrounded by stuff that he can use to exercise his need to chew. Both the toys and Cherie’s are consumed of course, so I get more. Some dogs have such bite force that nothing can withstand it, so it’s not worth trying. Just keep the house stocked and you’re golden.
    Doesn't always work. When Pep (remaining pug) was a pup, even with ample chew toys she still found time to chew on one of the dining room table legs and other furniture on occasion.

  36. #36
    Join Date
    May 2001
    Location
    Behind Enemy Lines
    Posts
    156,348
    Well, like with any toddlers, you have to keep constant watch on them!

  37. #37
    Join Date
    Jul 2004
    Location
    State of confusion
    Posts
    5,283
    Quote Originally Posted by Seeker22 View Post
    Me too! I do know this- what these nerds do beats working out under the sun hands down, especially as they age.

    Lali Kong update- the thing lasted two days. Sigh. Vet reccomended something called a Goughnut. At least she doesn't pee on the floor anymore (Lali; not the Vet).
    So, the vet does still pee on the floor?
    My wife vowed she would break me of peeing in the sink.
    Hasn’t happened yet, but I do take the dishes out first.
    "...Cry 'Havoc' and let slip the cats of war..."
    Razor sharpening while you wait - Occam
    If it works, it doesn't have enough features. - Windows 10 design philosophy.
    Forget the beer, I'm just here for the doom!
    Humans, just a tool for amino acids to make Swiss watches.

  38. #38
    Join Date
    May 2001
    Location
    Behind Enemy Lines
    Posts
    156,348
    As long as you don't pee in the oven...

  39. #39
    Join Date
    Sep 2005
    Posts
    13,604
    My crazy big black British Shorthair kitten Furgus AKA "The Furglar" (he steals socks and Only cashmere), got himself into a Nested If (COBOL) and ended up in a Loop going 'round and round on my down comforter duvet this morning (freakout reason unknown) and there was down Everywhere! Lol! V

  40. #40
    Join Date
    May 2001
    Location
    Behind Enemy Lines
    Posts
    156,348
    You need a loop counter with an exit....

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


NOTICE: Timebomb2000 is an Internet forum for discussion of world events and personal disaster preparation. Membership is by request only. The opinions posted do not necessarily represent those of TB2K Incorporated (the owner of this website), the staff or site host. Responsibility for the content of all posts rests solely with the Member making them. Neither TB2K Inc, the Staff nor the site host shall be liable for any content.

All original member content posted on this forum becomes the property of TB2K Inc. for archival and display purposes on the Timebomb2000 website venue. Said content may be removed or edited at staff discretion. The original authors retain all rights to their material outside of the Timebomb2000.com website venue. Publication of any original material from Timebomb2000.com on other websites or venues without permission from TB2K Inc. or the original author is expressly forbidden.



"Timebomb2000", "TB2K" and "Watching the World Tick Away" are Service Mark℠ TB2K, Inc. All Rights Reserved.