File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Compilation Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Compilation Error" Watch "Compilation Error" New topic
Author

Compilation Error

Sarah Gibson
Greenhorn

Joined: Apr 03, 2013
Posts: 3
I work for a software company as a trainer, and along the way have been writing SIMPLE "smart functions". I had a request from a client today that I really want to figure out for them. Just when I get it to work, I think of another area that I am missing...

They want to populate a field based on the following criteria:

R_Sphere and L_Sphere have to be between a -2.00 and 4.00
FOCALTYPE is Single Vision Lenses
PLANNAME is like VSP (VSP Signature, VSP Choice, VSP Value)
R_Cyl and L_Cyl is -2.00 or less...or blank.

Here is my messed up script:

var

R_SPHERE: Real;
L_SPHERE: Real;
PLANNAME: String;
FOCALTYPE: String;

begin
IF SF.TABLEINEDITMODE ('FRAM_RX') then
begin
R_SPHERE:=sf.getfieldReal('Fram_Rx','R_Sphere');
L_SPHERE:=sf.getfieldReal('Fram_Rx','L_Sphere');
PLANNAME:=Sf.GetFieldText('FRAM_RX','PLANNAME');
FOCALTYPE:=SF.GetFIeldText('FRAM_RX','FOCALTYPE');
begin
IF (((PLANNAME = 'VSP Signature') OR (PLANNAME = 'VSP Choice') OR (PLANNAME = 'VSP Value'))) then
begin
IF (((R_SPHERE <= '4.00') and (R_SPHERE >= '0.25') and (R_SPHERE >= '-0.25') and (R_SPHERE >= '-4.00') and (L_SPHERE <= '4.00') and (L_SPHERE >= '0.25') and (L_SPHERE >= '-0.25') and (L_SPHERE >= '-4.00'))) then
begin
SF.AssignFieldText ('FRAM_RX','OPTICALLAB','City Optical Lab');
end;
end;
end;
end;
end;

Can anyone PLEASE PLEASE help me?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

Well, for starters, that's not Java.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sarah Gibson
Greenhorn

Joined: Apr 03, 2013
Posts: 3
HA HA! So I posted this in the total wrong area!

I train on how to USE the software, I am not a programmer; I am just trying to learn more about the SIMPLE stuff I have been doing i.e. procedure REPORTEXAMVITALS( Sender );
begin
SF.SHOWEXAMREPORT('EXAMVITALS.ExamScrnRpt',0);
end;

so that I can help instead of bugging the programmers all the time.

I will look elsewhere! Thanks!

Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7552
    
  18

Sarah Gibson wrote:I work for a software company as a trainer, and along the way have been writing SIMPLE "smart functions". I had a request from a client today that I really want to figure out for them. Just when I get it to work, I think of another area that I am missing...

It's a fairly common situation called 'development paralysis', and it can take many forms. Yours arises (I suspect) from imprecise requirements.

My advice (and it's always the same): StopCoding (←click).

Back up and ask yourself what you're doing, and write the requirements down in English and in full before you write another line of code.

Bear's point aside, I think it's sufficiently generic advice to cross language platforms.

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Sarah Gibson
Greenhorn

Joined: Apr 03, 2013
Posts: 3
Thank you Winston for your polite response! I am getting a Double and String incompatibility error.

I am thinking I will just go bug the programmers (first to find out what the name of this is..obviously not Java or take a class....programming people can be brutal with the simple stuff!

The software I use has it's own "Smart Function Editor" so there is stuff going on in the background that the programmers hide from us. I think I will stick to training on how to use the software itself...I've got that part down!

Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2840
    
  11

I think it's Pascal, though it's been so long since I've seen Pascal that I'm not totally sure. For your error, '4.00' is a string, but what you want there is a number. Take away the quotes you put around all those values and, well, I can't promise everything will work, but at least you'll move on to the next error!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compilation Error
 
Similar Threads
About substraction of "double"
Problems w/ formatted text
Need help with displaying data in a JTable
What's wrong with this 'Change Machine' code?
Importing values from html