Post Reply 
Calling a Program from Home Page. What's Wrong
12-11-2014, 12:41 PM
Post: #9
RE: Calling a Program from Home Page. What's Wrong
(12-10-2014 07:32 AM)bobkrohn Wrote:  New user.
Wrote my first program. Catesian Coord System

P2RN - Polar 2 Rectangular North Coordinate
A = Azimuth
D = Distance
==================
EXPORT P2RN(A,D)
BEGIN
//

LOCAL N;
N:=COS(A)*D;

RETURN N;

END;
==================

what am I doing wrong?

Your entire program is viewed as a comment, and hence doesn't execute. If you remove the "====" in both places, and remove the "//" to uncomment the program, it runs fine. This is more clearly seen (in the conn kit), if you copy / paste the code you've shown here, into the emulator over a "new" P2RN Program.

Conversely, you can keep the ==='s if you place "//" comment symbols before them, accordingly:
Code:

// ==============

EXPORT P2RN(A,D)
BEGIN


LOCAL N;
N:=COS(A)*D;

RETURN N;

END;

//============
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Calling a Program from Home Page. What's Wrong - DrD - 12-11-2014 12:41 PM



User(s) browsing this thread: 2 Guest(s)