# RAPID programming

**URL:** <https://tech-community.robotics.abb.com/t/rapid-programming/904>\
**Category:** Robot Controller\
**Created:** [October 24, 2006, 2:48pm UTC](https://tech-community.robotics.abb.com/t/rapid-programming/904 "2006-10-24T14:48:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martiner](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@Martiner](https://tech-community.robotics.abb.com/u/Martiner)\
**Post date:** [October 24, 2006, 2:48pm UTC](https://tech-community.robotics.abb.com/t/rapid-programming/904/1 "2006-10-24T14:48:06Z")

</div>

I would like to use record data type in my program. I read manual, done steps according to it and rapid writes errors. Has anyone experience with aliaces and records? Could you write me the way to do this?

---

<div class="post-metadata">

**Author:** ![claudio](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@claudio](https://tech-community.robotics.abb.com/u/claudio)\
**Post date:** [October 25, 2006, 9:06am UTC](https://tech-community.robotics.abb.com/t/rapid-programming/904/2 "2006-10-25T09:06:01Z")

</div>

If you’re programming an S4C+ controller, you will need the “Developer’s Functions” option (or an option including it). On IRC5+ you probably need the “Advanced RAPID”, but I’m not 100% sure.  
If you don’t have it, the controller will give you a syntax or sematic error.  
Check the options you installed when you load the system.

If everything is ok, definition of new records is straightforward:

MODULE MyModule  
RECORD MyRecord  
bool bField1;  
num nField2;  
ENDRECORD  
VAR MyRecord MyVariable

PROC Main()  
MyVariable.bField1:=TRUE;  
MyVariable.nField2:=5;  
ENDPROC

ENDMODULE

---

<div class="post-metadata">

**Author:** ![Martiner](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@Martiner](https://tech-community.robotics.abb.com/u/Martiner)\
**Post date:** [October 25, 2006, 10:08am UTC](https://tech-community.robotics.abb.com/t/rapid-programming/904/3 "2006-10-25T10:08:47Z")

</div>

Thank you very much claudio! Now it’s OK. My problem was that I defined RECORD below VAR. If it is above VAR so that is correctly.
