NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
February 25, 2021, 01:15:52 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
An interdisciplinary approach. ...Wisdom
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
Author Topic: Hoe to declare arrays in EJS  (Read 8691 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
Fred Chuit
Offline Offline

Posts: 18

Embed this message
on: December 24, 2008, 01:26:30 am » posted from:Meppel,Drenthe,Netherlands

Dear EJS-users,

I can not find info how to declare arrays on the variable page of EJS.
I would like to use single and multi dimension arrays of strings and arrays of double.
What do I have to fill in in the coloms: Name Value Type Dimension.

Already many thanks for your help.
Fu-Kwun Hwang
Hero Member
Offline Offline

Posts: 3086

Embed this message
Reply #1 on: December 24, 2008, 07:10:01 am » posted from:Taipei,T'ai-pei,Taiwan

In the last column for the variable type in [3],then you will have 1D array with 3 element.
Type in [3][5] then you will have 2D array.
Normally, I will define variables for # of elements,
e.g.: nx=3,ny=5, then type in [nx][ny]

If you check out simulations posted in this forum with many particles/elements,
you can download ejs source and find out how it was defined.
Pages: [1]   Go Up
An interdisciplinary approach. ...Wisdom
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.045 seconds with 22 queries.since 2011/06/15