• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Adding Geometry,Centimeter,Millimeter Scale,Graph to Computer Programs such as C, C++, Java,BASIC

 
Ranch Hand
Posts: 104
Netbeans IDE Eclipse IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,
Thanks for the Opportunity
Sorry for inconvenience If any

In India 1996 Secondary School Leaving Certificate, Mathematics Subject included Geometry and Graph

Adding Geometry, Centimeter, Millimeter Scale, Graph to Computer Programs such as C, C++, Java, BASIC etc are idea for me from my education time 1996 to till date in Computer science etc

In B.E Mechanical I created Drawings in Auto CAD, Mechanical Desktop, Ansys, Word, Excel, Paint, etc

But I not remember whether I used any scale to verify the Scale Dimensions such as Centimeter, Milli meter after printing drawings from Auto CAD, Mechanical Desktop, Ansys etc

In all other programming such as BASIC, Java, C, C++, I not used Geometry & Scale Similar to Geometry Box tools

I have seen Excel, Lotus 1-2-3 with chart

But similar to India 1996 Secondary School Leaving Certificate, Mathematics course, Middle School course,  I not remember Geometry Box tools such as Scale etc in Computer programming from 1996

Drawing are created using Menu Bar, Mouse click events, commands etc

But standard (Mathematics and Engineering Drawing) Geometry Box like tools  are not used

I am thinking about possibilities of adding Geometry, Centimeter, Millimeter Scale, Graph to Computer Programs
Please guide me on this

I am not in touch with Auto CAD software now

I do not have any Geometry Box now in my home to work on Drawing, Graph etc similar to India 1996 Secondary School Leaving Certificate, Mathematics Subject or Engineering Drawing

Please help me on this topic If possible

Please provide your feedback, guidance, ideas If any

Thank you
 
Marshal
Posts: 79179
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have never come across a language with built‑in units. If you mean adding units to a scale on a GUI, that would use the usual techniques for dividing up a line.
 
Babu Muthukrishnan
Ranch Hand
Posts: 104
Netbeans IDE Eclipse IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Campbell Ritchie, Thanks for response. I want to replicate India 1996 Secondary School Leaving Certificate Mathematics subject lessons, Middle school Mathematics subject lessons, B.E Mechanical Engineering Drawing Lessons, Machine drawing lessons in Computer Programming and CAD software. I trust standards provided in Geometry Box, Paper Graph etc. I not able to comment about Units now. Thank you
 
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have a clear goal that you would like us to help you achieve?
 
Babu Muthukrishnan
Ranch Hand
Posts: 104
Netbeans IDE Eclipse IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Stephan van Hulst, Thanks for reply. I communicated the query related to Computers programming in this Thread & Forum. I feel If any Quality gap found in Computer Programming, Then that Quality gap needs to be solved in future If possible. I will work on my Goals and comeback If possible. Thank you
 
Stephan van Hulst
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Babu Muthukrishnan wrote:I feel If any Quality gap found in Computer Programming, Then that Quality gap needs to be solved in future If possible.


Solved by whom? The designers of general purpose languages like Java?

You need to understand that general purpose languages like Java are just that: General purpose. It's not the responsibility of Java to add features that are only used in a very small subset of applications. If you want to use units like centimeters in your application, you will either have to find a library that supplies an appropriate type, or you will have to write one yourself. This really isn't too difficult:
 
Babu Muthukrishnan
Ranch Hand
Posts: 104
Netbeans IDE Eclipse IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Stephan van Hulst, Thanks for response. I need to use School Mathematics subject Books of 6th to SSLC, or B.E Mechanical Engineering Drawing Books, or Machine drawing Book and create drawing using Geometry Box, Graph etc. Same steps I want to perform in Computer. String Data unit specification is easy. But using Geometry Box scale standards accurately in Computer Programming is not done. I have seen Paper size A4 etc when printing, MS Office Word, Open Office Document etc with Margin etc. I have not seen such Margin scale or any other scale in Computer programming for Geometry etc. I have real world case studies related to Geometry for example Sun or Moon dimensions are very long distance from earth, difficult to simulate the Sky dynamics in Computer Programming. If we take easily available vegetables like Tomato, Potato or Sports Cricket Balls or Tennis balls etc can be used for case study analysis in earth for easy & faster communication etc. But I not remember all the Mathematics equations from Higher Secondary Certificate for this Research and Development  etc. Thank you
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:I have never come across a language with built‑in units.



The you have not come across Ada. Allegedly one of the formative aspects of the Ada programming language was because a rather expensive satellite got destroyed because someone had inadvertently mixed inches and centimetres.

Units are not, strictly speaking, built into Ada, but it has very strong typing and a packaging system that can be used to define units. You can define both domain and range, so you can even define a people-height-in-inches datatype and have it signal an error if you try and assign a height of 50 feet to a woman.

One of the other intentions of Ada had to do with the fact that the various branches of the United States Government and its military services each tended to have about 5 totally unique programming languages apiece, such as the COBOL-like JOVIAL language of the US Air Force. Ada was supposed to be the mandated universal language, allowing code sharing as well as the ability to farm out work to contractors or other divisions without having to put them through learning curves.

Alas, Ada was ahead of its time. In 1990, I could absolutely cripple a small IBM mainframe just doing an Ada compile. Its extensive validation overhead actually made compiling Ada slower than I could compile Fortran on my 4MHz Z-80 box. So if Ada really ever became universal, it's a well-kept secret.

As it happens, early Java was also burdensome, but their timing was good enough that faster processors coming out kept it from becoming an issue.

If you'd like to play around with Ada, there's an open-source version of it called Gnat. There are even packages to talk to the Linux GUI available.
 
Campbell Ritchie
Marshal
Posts: 79179
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, I haven't used Ada.

Tim Holloway wrote:. . . a packaging system that can be used to define units. . . .

Stephan has shown how you could define an enum for units. Come to think of it, Java® already has a similar enum: this one.

a height of 50 feet to a woman. . . .

What's wrong with that ()?
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used to define unit classes when I worked regularly in C++. But C++ cannot enforce stuff like that with sufficient rigidity. In Ada, an inch may be an INTEGER and so might a centimeter, but it is impossible to assign one to the other at either compile or runtime without providing an explicit converter. You can't just assign a dimensionless integer value to a unit type in Ada.
 
Campbell Ritchie
Marshal
Posts: 79179
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now, that's rigidify. And the more strictly you enforce a type system, the less chance there is of type errors.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:I have never come across a language with built‑in units.



When I learned PL/I it had a "STERLING" data type. But as you can imagine, that was a long time ago.
 
Campbell Ritchie
Marshal
Posts: 79179
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Was that in pounds shillings and pence? Did they use halfpennies and farthings. I can still remember all those units. They had their uses; for example it was easier to divide money between three people.
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I once saw a classic PL/1 example where you added 1 + 1 + 1 + 1 + 1 and got something like 137. The key being that each "1" was a different datatype. So I wouldn't depend on it to promote type-safety.

Oh boy. I just checked the manual. STERLING is a datatype that encapsulates pounds/shillings/pence. So it's actually a triple. And, of course, obsolete now that the pound has been decimalized!
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or "decimalised". I'd have to re-open the book, but yes, I believe they had an example with fractional pence.
 
Campbell Ritchie
Marshal
Posts: 79179
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:. . . obsolete now that the pound has been decimalized!

Not so much obsolete, but more only for use in historical programming.
The pound was neither decimalised nor decimalized (thank you for the s, Tim), but like most currencies elsewhere, centimalised. What is the origin of the words centime (old French) and cent?
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About that. Does anyone actually pronounce that "s" as "s"? It's like pronouncing the "u" in colour.

Granted, I choked when the abortive modern reform movement came up with "thoroly". And dad wanted to know why we didn't spell "worshing machine" (he was from Kentucky).

Anywho. It wasn't me who named it "decimalisation". And actually, the term didn't mean literally "precise to the decimal", but rather "using decimal fractions". Only basic bookkeeping actually works with cent-based amounts. High finance typically goes out 3-4 decimals or more. On computers, usually floating-point.

I'd rate the STERLING notation in PL/1 as obsolete. You cannot use it effectively for any application that isn't doing historical computations.
 
Campbell Ritchie
Marshal
Posts: 79179
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:About that. Does anyone actually pronounce that "s" as "s"? . . .

When prise (=twist) and prize (=award) are pronounced the same, shouldn't the answer be obvious.
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dunno. To me, "prise" and "pry" were always synonymous, if not actual variant conjugations. If I apply torsion, I'd say "twist" or "unscrew". Though if you wish to prise something open by pounding on it and applying various lateral and rotational forces (a/k/a extreme prejudice), I'm good with that.
 
Campbell Ritchie
Marshal
Posts: 79179
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:. . . To me, "prise" and "pry" were always synonymous . . .

There would be a prize for that, only here pry usually means to look, enquire (starting e), and snoop intrusively.

“Two nations separated by a common language.”
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Pry bar"?
reply
    Bookmark Topic Watch Topic
  • New Topic