PDA

View Full Version : fraction in kword

KrazyMann225
20th Jul 2011, 07:41 pm
This may be a noob question but, I was wondering if it is possible (with relative ease) to use a fraction as a kword or do I have to go with the decimal equivalents.

BlackBox
20th Jul 2011, 08:00 pm
This may be a noob question but, I was wondering if it is possible (with relative ease) to use a fraction as a kword or do I have to go with the decimal equivalents.

What result have your attempt(s) yielded (Post your code)?

Here's a simple example (no peeking!):

(initget 1 "1\\4\" 1\\2\" 3\\4\"")
(setq opt (getkword "\nEnter option [1\\4\"/1\\2\"/3\\4\"]: "))
(print opt)

BlackBox
20th Jul 2011, 08:06 pm
Ohh, BTW - Thanks for stealing my signature quote (without attribution), dude.

http://www.theswamp.org/Smileys/aaron/tickedoff.gif http://www.theswamp.org/Smileys/aaron/knuppel2.gif http://www.theswamp.org/Smileys/aaron/tickedoff.gif

28792

KrazyMann225
20th Jul 2011, 08:11 pm
well, i figured it out just before I discovered that you responded back all i needed to do was double backslash, i thought i had tried it but i think i was mistankly doing double forward slashs, for reasons inknow to me....im going to blame it on lack of sleep. But **** for \$%#@ and giggles the winning code (for me) was :

(initget "Custom 1\\8 1\\4 3\\8 1\\2 3\\4 1 1.25 1.5 2 2.5 3 3.5 4 5 6 8 10 12")
(setq Nominal (getreal "Enter new nominal pipe diameter or [Custom/1\\8/1\\4/3\\8/1\\2/3\\4/1/1.25/1.5/2/2.5/3/3.5/4/5/6/8/10/12]: "))

KrazyMann225
20th Jul 2011, 08:13 pm
well that's hilarious, I got that quote from someone off facebook! the quote is now redacted. you can now put down the bat.......put down the bat........oh god, hel.

BlackBox
20th Jul 2011, 08:22 pm
well that's hilarious, I got that quote from someone off facebook! the quote is now redacted. you can now put down the bat.......put down the bat........oh god, hel.

I'm not even on Facebook, so I'm not sure who, how, why, etc... I'll have to investimagate.

There's no need to redact; I'm glad you like the quote.

I don't have a problem with your (or anyone else's) using it, just throw the attribution on there. :wink: It's one of the very few original thoughts I've ever had. You wouldn't use someone elses routine without doing the same.

Cheers! :beer:

KrazyMann225
20th Jul 2011, 08:28 pm
well in that case, thanks for the assistance too.

BlackBox
20th Jul 2011, 08:29 pm
well in that case, thanks for the assistance too.

You're very welcome; I'm glad I was able to help. :)

BlackBox
20th Jul 2011, 08:32 pm
Awesome! :D You made my day, KrazyMann225.

28793

KrazyMann225
20th Jul 2011, 09:10 pm
LoL np, it's a good quote and reflects many of the day to day problems of a consultant eng!

BIGAL
22nd Jul 2011, 04:22 am
The man who never made mistakes never made anything ! told to me by my grandfather died at 102 he had a good life and probably made the odd mistake.