Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Roman digtail clock

Author
Message
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 13th Feb 2005 04:58
HI.

Just a quick one a Roman digtail clock.

In Space No One can Hear You Scream! (When your comm Line is cut?)
Monsieur Mort
19
Years of Service
User Offline
Joined: 12th Feb 2005
Location:
Posted: 13th Feb 2005 16:10
Arg why did you add all those backslashes? I'm sure the progs very nice but I'm not going to go deleting them all just to see it...

Yes, sir, but sir is not a rabbit, is sir?
Mr Pointless
20
Years of Service
User Offline
Joined: 17th Oct 2004
Location: Stuck in the UK
Posted: 14th Feb 2005 03:47 Edited at: 14th Feb 2005 03:48
It's not his fault, it's the site. Look at my location. Why would I put a backslash before an apostrophe? I didn't.

If you're using Pro just go to Search > Search/Replace, put the backslash in the Text to find box and leave Replace With blank. Should work now.

[EDIT] Forgot to say, very nice.

"My gods, Detritus, that's not a crossbow, that's a national emergency." - Sam Vimes from "The Fifth Elephant".
Monsieur Mort
19
Years of Service
User Offline
Joined: 12th Feb 2005
Location:
Posted: 14th Feb 2005 07:25
Ok, yeh it works now. Haha, that's one random program. Works fine though

Yes, sir, but sir is not a rabbit, is sir?
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 15th Feb 2005 01:47
For all who do not wish ro remove the back lashes.




anyone know why it did that?



In Space No One can Hear You Scream! (When your comm Line is cut?)
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 15th Feb 2005 01:54
Anyone know if I could have made the code smaller, like a better lookup code to pick the correct numbers, forr all digets.
having just repasted it, tis a bit long.

In Space No One can Hear You Scream! (When your comm Line is cut?)
Mr Pointless
20
Years of Service
User Offline
Joined: 17th Oct 2004
Location: Stuck in the UK
Posted: 15th Feb 2005 03:29
How about using colons (this little thing : here)? Just replace the parts where you have hit Enter with this. Careful, DB doesn't like it if lines are too long.

"My gods, Detritus, that's not a crossbow, that's a national emergency." - Sam Vimes from "The Fifth Elephant".
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 15th Feb 2005 04:31
Yes I know about that, but this is so that if you are new at this you can see how it works.

As I was asking can it be done with just nine lookups for each of the digets.

In Space No One can Hear You Scream! (When your comm Line is cut?)
Mr Pointless
20
Years of Service
User Offline
Joined: 17th Oct 2004
Location: Stuck in the UK
Posted: 15th Feb 2005 05:28
Oh, sorry.

It won't make it easier to read, but it would take up fewer lines.

"My gods, Detritus, that's not a crossbow, that's a national emergency." - Sam Vimes from "The Fifth Elephant".
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 15th Feb 2005 07:33 Edited at: 15th Feb 2005 07:34
Use an array to store the Roman Numbers


Then, instead of assigning them with 20 statements, use a data table.

i.e.


"Droids don't rip your arms off when they lose." -H. Solo

REALITY II
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 17th Feb 2005 02:47
I give that one a try, at the weekend cheers.

In Space No One can Hear You Scream! (When your comm Line is cut?)
NinJA99
19
Years of Service
User Offline
Joined: 21st Jan 2005
Location: Windham, NH
Posted: 18th Feb 2005 21:28
I converted it into a 12-hour clock:

BTW, cool code! Useful for a base for lots of things.

END TRANSMISSION
PowerSoft
20
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 26th Feb 2005 16:43
dim ClockHours$(12)

ClockHours$(1)="I"
ClockHours$(2)="II"
.....
ClockHours$(12)="XII"



then pass the number to the index

Powersoft Scripting Language under redevelopment!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 13th Mar 2005 16:49
Yes, simple things that lead to The Big Project and beyond.

In Space No One can Hear You Scream! (When your comm Line is cut?)

Login to post a reply

Server time is: 2024-11-23 14:30:19
Your offset time is: 2024-11-23 14:30:19