pascal compiler error???
MEDState Notation Repository › Forums › Coding Help Archive › pascal compiler error???
- This topic has 1 reply, 1 voice, and was last updated 8 years, 8 months ago by
Med_Support.
-
AuthorPosts
-
April 22, 2011 at 9:23 am #13111
Med_Support
ModeratorEsther Lin
I have some med-pc programming problem and tried to register on the
forum for twice, but I have not had any replies. So I thought I emailed
you about my questions directly.What I was trying to do is to write a program that allows me to chose
training phase and stimulus at different training stages, for example, I
can chose to run phase1 and use visual stimuli, V1 and V2. All stimulus
can also be selected for counterbalanceing. Therefore, the s1 of s.s.1
should allow me to do all these stuff before #start:However, while I was trying to load my program, it says pascal complier
errors on s2 of s.s.1. I was wondering if you have any suggestions.Quote \Controls: (These need to be checked when putting together the boxes) \ Outputs \ ^house = 6 ^left = 2 ^right = 1 ^feeder1 = 14 ^feeder2 = 15 ^fan = 16 ^Tray =3 \ \ \ Inputs \ ^headentry = 3 \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \Session Constants: (can be changed) ^Trials = 48 ^delay = 0 ^preCS1 = 5 ^preCS2 = 5 ^CSDur1 = 5 ^CSDur2 = 5 \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \ Event stamps ( array I ) \ \ 5 = Reinforcement delivery \ 17 = ITI over \ 24 = Magazine head entry \ 25 = Magazine head entry off \ 26 = headentry for reward \ 11 = V1 On \ 12 = V2 On \ 13 = V1A1 on \ 14 = V2A2 on \ 15 = A1 on \ 16 = A2 on \ 21 = feeder 1 on \ 22 = feeder 2 on \ 23 = nonreinforced \ 6 = 3 rewards \ 7 = 1 reward \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \Variables: \ A(1) = current VI \ A(2) = current trial \ A(3) = trial counter \ A(4) = headentry counter \ A(5) = headentry off \ A(6) = chose phase (1=phase1; 2=phase2; 3= phase3) \ A(9) = V1 on (0=off; 1=on) \ A(10) = V2 on (0=off; 1=on) \ A(11) = V1A1on(0=off; 1=on) \ A(12) = V2A2on(0=off; 1=on) \ A(13) = A1 on (0=off; 1=on) \ A(14) = A2 on (0=off; 1=on) \ A(15) = V1 (1:house; 2=panel) \ A(16) = V2 (1:house; 2=panel) \ A(17) = V1A1 (1=housetone; 2=housenoise;3=panelnoise;4=paneltone) \ A(18) = V2A2 (1=housetone; 2=housenoise;3=panelnoise;4=paneltone) \ A(19) = A1 (1=tone; 2=noise) \ A(20) = A2 (1=tone; 2=noise) \ A(21) = feeder1 on \ A(22) = feeder2 on \ A(23) = nonreinforced event \ A(24) = 3rewards \ A(25) = 1reward \ G = event and time stamp counter \ T = time stamp \ E = event identity stamp \ I = period flag (3=cs;4=precs;5=ITI) \ m = Mag flag (0=magoff,1=magon) \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \Data Arrays: dim Q = 50 dim E = 10000 dim T = 10000 dim c = 310 dim d = 310 dim y = 50 \VI duration \ \Program Arrays dim a = 12 \ \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \List Data: \list of trial types list l = 1,2,2,1,2,1,1,2,1,2,2,1,2,1,1,2,1,2,2,1,2,1,1,2,2,1,1,2,1,2,2,1,2,1,1,2,1,2,1,1,2,1,1,2,1,2,2,1 \list for stimuli on phase 1 list s = 1,2,2,1,2,1,1,2,1,2,2,1,2,1,1,2,1,2,2,1,2,1,1,2,2,1,1,2,1,2,2,1,2,1,1,2,1,2,1,1,2,1,1,2,1,2,2,1 \list of stimuli on phase 2 list w = 1,1,1,1,1,2,2,2,2,2,3,3 \list of stimuli on phase 3 list v = 30",35",40",45",50",55",60",65",70" \VI list \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \z-signals: ^begin = 1 ^inter = 2 \ ^on3reward = 5 \ ^on1reward = 6 ^onfeeder1 = 9 \ ^onfeeder2 = 10 \ ^onITI = 11 \ ^onTray = 12 \ ^offTray = 13 ^onHouse = 14 ^offHouse = 15 ^onFlash = 16 ^offFlash = 17 ^onLeft = 18 ^offLeft = 19 ^onRight = 20 ^offRight = 21 ^onTone = 22 ^offTone = 23 ^onNoise = 24 ^offNoise = 25 ^phase1 = 26 ^phase2 = 27 ^phase3 = 28 \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DISKVARS = a,b,c,d,e,p,q,r,y,z,x,v,w,h,k,l,t VAR_ALIAS phase (1=phase1; 2=phase2; 3=phase3) = A(6) VAR_ALIAS V1 on (0:off; 1:on) = A(9) VAR_ALIAS V2 on (0:off; 1:on) = A(10) VAR_ALIAS V1A1 on (0=off; 1=on) = A(11) VAR_ALIAS V2A2 on (0=off; 1=on) = A(12) VAR_ALIAS A1 on (0=off; 1=on) = A(13) VAR_ALIAS A2 on (0=off; 1=on) = A(14) VAR_ALIAS V1 on (1:house; 2=panel) = A(15) VAR_ALIAS V2 on (1:house; 2=panel) = A(16) VAR_ALIAS V1A1 on (1=housetone; 2=housenoise;3=panelnoise;4=paneltone) = A(17) VAR_ALIAS V2A2 on (1=housetone; 2=housenoise;3=panelnoise;4=paneltone) = A(18) VAR_ALIAS A1 on (1=tone; 2=noise) = A(19) VAR_ALIAS A2 on (1=tone; 2=noise) = A(20) \ \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \############################# The Program ############################## \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \*************************** TIMING PROCEDURES ************************** \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ s.s.1 \set default before start s1, 0":set A(6)=1, A(9)=1, A(10)=1, A(11)=1, A(12)=1, A(13)=1, A(14)=1, A(15)=1, A(16)=2,A(17)=1, A(18)=2,A(19)=1, A(20)=2, E(0)=-987.987, T(0)=-987.987;--->s2 s2, 0.1":ON^Fan;--->s3 s3, #start:IF A(6)=1 [@phase1; @others] @phase1:z^phase1;--->s4 @others: IF A(6)=2 [@phase2,@phase3] @phase2:z^phase2;--->s4 @phase3:z^phase3;--->s4 s4, ^Delay":z^begin, ^inter;--->sx \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ s.s.2 \Time events within each trial of phase 1 s1, #z^phase1:IF A(3)=^Trials [@end,@next] @end:--->s11 @next:show 1, trial, A(3)+1; set I = 7; RANDD A(1)=V; List A(2)= L(X); set Y(A(3)+1) = A(1);--->s2 s2, A(1)#T: set I = 6;--->s3 s3, ^preCS1":set I = 5;--->s4 s4, ^PreCS2":set I = 4;IF A(2)= 1 [@V1,@V2] @V1:IF A(15)=1 [@house, @flash] @house:z^onHouse; SET T(G) = H, E(G) = 11, T(G+1) = -987.987, E(G+1) = -987.987; ADD G, A(9);--->s5 @flash:z^onFlash; SET T(G) = H, E(G) = 11, T(G+1) = -987.987, E(G+1) = -987.987; ADD G, A(9);--->s5 @V2:IF A(16)=2 [@Flash,@house] @Flash:z^onFlash;SET T(G) = H, E(G) = 12, T(G+1) = -987.987, E(G+1) = -987.987; ADD G, A(10);--->s5 @house:z^onHouse;SET T(G) = H, E(G) = 12, T(G+1) = -987.987, E(G+1) = -987.987; ADD G, A(10);--->s5 s5, ^CSDur1":set I=3;--->s6 s6, ^CSDur2":set I=2;z^offFlash,^offHouse ; IF A(2)=1 [@3reward, @1reward] @3reward:z^onfeeder1;SET T(G) = H, E(G) = 6, T(G+1) = -987.987, E(G+1) = -987.987; ADD G, A(18);--->s7 @1reward:z^onfeeder1;SET T(G) = H, E(G) = 7, T(G+1) = -987.987, E(G+1) = -987.987; ADD G, A(19);--->s9 s7, 5":z^onfeeder1;--->s8 s8, 1":z^onfeeder1;--->s10 s9, 5":--->s10 s10, 0":add A(3);--->s1 S11, 1":--->StopAbortFlush
Thanks in advance,
Esther
April 22, 2011 at 9:54 am #13112Med_Support
ModeratorGary Bamberger
When I try to compile your program here is the error messages that I receive:
Source: unblockingpilot2 Line: 415 ERROR # 1 #z^onWhite:~SetFreq(MG,BOX,0);~;~SetAmp(MG,BOX,90);~;~SetRF(MG,BOX,10);~;~ToneOn(MG,BOX);~;--->s2 Offending text: ^ONWHITE A constant is missing '^' or undeclared constant Source: unblockingpilot2 Line: 418 ERROR # 1 #z^offWhite:~ToneOff(MG,BOX);~;--->s1 Offending text: ^OFFWHITE A constant is missing '^' or undeclared constant Source: unblockingpilot2 Line: 427 ERROR # 12 #z^onHouse:^onHouse;--->s2 Offending text: ^onHouse; Failure to find legal output command following ';' or ':' Source: unblockingpilot2 Line: 429 ERROR # 12 #z^offHouse:^offHouse;--->s1 Offending text: ^offHouse; Failure to find legal output command following ';' or ':' Source: unblockingpilot2 Line: 436 ERROR # 1 #z^onFlashl:^onRight, ^onLeft;--->s2 Offending text: ^ONFLASHL A constant is missing '^' or undeclared constant Source: unblockingpilot2 Line: 439 ERROR # 12 0.4":^OffRight,^offLeft;--->s3 Offending text: ^OffRight,^offLeft; Failure to find legal output command following ';' or ':' Source: unblockingpilot2 Line: 441 ERROR # 12 0.4":^OnRight,^onLeft;--->s2 Offending text: ^OnRight,^onLeft; Failure to find legal output command following ';' or ':' Source: unblockingpilot2 Line: 442 ERROR # 12 #z^offFlash:^offRight,^offLeft;--->s1 Offending text: ^offRight,^offLeft; Failure to find legal output command following ';' or ':'
* Errors 1 and 2: ^OnWhite and ^OffWhite do not exist.
* Errors 3 and 4: I believe that you meant to put ON ^House and OFF ^House instead of ^OnHouse and ^OffHouse.
* Error 5: ^OnFlashL does not exist.
* Errors 6, 7, and 8: These are the same types of errors as 3 and 4.
-
AuthorPosts
- You must be logged in to reply to this topic.