Hi everybody. I have a problem. i want to declare more variables like (REALS, integer, string..) how do i declare those variables. i searched on teach pendant, but i can't find it to declare, pls help me. thank you
variables like (REALS, integer, string..)
-
enough -
April 21, 2022 at 12:00 PM -
Thread is Unresolved
-
-
- Best Answer
Variables are user dependent, you will not find any dedicated GUI for this.
You can create and store User defined AS Instructions in Aux 0307, these can then be made available if you use the 'I' button for AS Language Teaching and Program Editing and will come under the Tab user definitions.
Anything created in Aux 0307 is not declared, unless used and executed within a program.
Not a brilliant feature IMHO, but usable.
Variables need to be declared and stored in memory using standard AS commands, so I recommend to read the AS Language Programming Manual as what is described is the most common form of variable definitions, either by manually entering or by programmatical routes.
The simple format and just entering them via the teach pendant keyboard, terminal editor, or in a program are below:
@int.ger = 1234
real.num = 1.234
$str.msg = "1234"
-
Các biến phụ thuộc vào người dùng, bạn sẽ không tìm thấy bất kỳ GUI dành riêng cho việc này.
Bạn có thể tạo và lưu trữ Hướng dẫn AS do người dùng xác định trong Aux 0307, những hướng dẫn này sau đó có thể được cung cấp nếu bạn sử dụng nút 'Tôi' cho Giảng dạy ngôn ngữ AS và Chỉnh sửa chương trình và sẽ nằm dưới định nghĩa người dùng Tab.
Mọi thứ được tạo trong Aux 0307 đều không được khai báo, trừ khi được sử dụng và thực thi trong một chương trình.
Không phải là một IMHO tính năng tuyệt vời, nhưng có thể sử dụng được.
Các biến cần được khai báo và lưu trữ trong bộ nhớ bằng các lệnh AS tiêu chuẩn, vì vậy tôi khuyên bạn nên đọc Hướng dẫn Lập trình Ngôn ngữ AS vì những gì được mô tả là dạng định nghĩa biến phổ biến nhất, bằng cách nhập thủ công hoặc bằng các tuyến lập trình.
Dưới đây là định dạng đơn giản và chỉ cần nhập chúng qua bàn phím hướng dẫn, trình chỉnh sửa đầu cuối hoặc trong một chương trình:
@ int.ger = 1234
real.num = 1.234
$ str.msg = "1234"
-
Thanks you i got it
-
Your welcome.
Additionally you also have local variables which are defined in the same way, except:
- They are prefixed with a '.'
- They can only be defined and used in programs as they are not stored in memory.
- Commonly used to copy master variables and be manipulated keeping the master variables intact.