Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Tests the zone of the leftmost character in the parameter.

Parameters

  1. Value - A String value to test.

Return Value

An Object with the following Boolean properties:

  • hi - True if the leftmost character is &, A-I, or any character with the same zone as A.
  • lo - True if the leftmost character is -, J-R, or any character with the same zone as J.
  • eq - True if the leftmost character is any other value.

Example

Test zone of 'A', 'J', and 'S'
  /* 
  
  Prints:
  
  true
  true
  true
  
  */
  
  var res = pjs.testZone("A");
  console.log(res.hi);
  
  res = pjs.testZone("J");
  console.log(res.lo);
  
  res = pjs.testZone("S");
  console.log(res.eq);

RPG Equivalent 

TESTZ

  • No labels