HELP! * GREY=local LOCAL HTML version of Foils prepared 15 January 1997

Foil 29 The JavaScript with Statement for objects

From JavaScript Tutorial for CPS616 Technologies of the Information Age 1997 Basic Information Track of CPS -- Spring Semester 97. by Geoffrey C. Fox * Important Information in IMAGE

with ( ParticularObject ) {
..Any old statements ..
}
// Within these curly braces, ParticularObject is assumed to be default object for any property or method that does not specify a parent object
with (Math) { // An example
area = PI *r*r; // PI is in Math object
x= r * cos(theta); // cos is method in Math Object
y= r * sin(theta); // sin is a method in Math Object
}



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat May 24 1997