Home Building DHTML Scripting Using Diaperglu Documention Key Script Commands Reference C Library API Reference Handy References About License Contact Forth Draft Standard
Directory Documentation key   C functions dg_forthlocalslstringfetch dg_forthtolocalslstring dg_forthlocalslstringbar  
// //////////////////////////////////////////////////////////////////////////////////////
//
// dg_forthlocalslstringfetch ( LOCALSL$@ )
//
// C prototype:
//  void dg_forthlocalslstringfetch (Bufferhandle* pBHarrayhead)
//
// Inputs:
//  Bufferhandle* pBHarrayhead    pointer to a Bufferhandle structure which is 
//                                 used as the bufferhandle for the array where the  
//                                 other bufferhandles are stored.
// 
// Stack action shorthand:
//  ( i -- )
//  ( -$- u$ )
//
// Data stack in:
//  i                             0 based index of local lstring variable in local  
//                                 lstring variable stack
//
// String stack out:
//  u$                            value of local variable lstring i
//                                                              
// Action:
//  i is popped off the data stack.
//  The value of local variable lstring i is pushed onto the string stack.
//
// Failure cases:
//  error popping i from the data stack
//  u missing from the local variable string stack
//  error pushing local variable lstring to the string stack
//  
// //////////////////////////////////////////////////////////////////////////////////////
// //////////////////////////////////////////////////////////////////////////////////////
//
// dg_forthtolocalslstring ( >LOCALSL$ )
//
// C prototype:
//  void dg_forthtolocalslstring (Bufferhandle* pBHarrayhead)
//
// Inputs:
//  Bufferhandle* pBHarrayhead    pointer to a Bufferhandle structure which is 
//                                 used as the bufferhandle for the array where the  
//                                 other bufferhandles are stored.
// 
// Stack action shorthand:
//  ( u$ -$- )
//  ( -localsl$- u$ )
//
// String stack in:
//  u$                            value of new local variable lstring
//                                                              
// Action:
//  Pops u$ off the string stack.
//  A new local variable is pushed onto the end of the locals lstring stack and it's
//   value is set to u$.
//
// Failure cases:
//  error popping u$ from the string stack
//  error pushing u$ to the locals lstring stack
//  
// //////////////////////////////////////////////////////////////////////////////////////
// //////////////////////////////////////////////////////////////////////////////////////
//
// dg_forthlocalslstringbar ( LOCALSL$| )
//
// C prototype:
//  void dg_forthlocalslstringbar (Bufferhandle* pBHarrayhead)
//
// Inputs:
//  Bufferhandle* pBHarrayhead    pointer to a Bufferhandle structure which is 
//                                 used as the bufferhandle for the array where the 
//                                 other bufferhandles are stored.
// 
// Stack action shorthand:
//  ( "<delimiters>name0<delimiters>name1<delimiters>...
//    namen<delimiters>|<delimiters>morestuff" 
//     -currentinputbuffer- 
//     "<delimiters>morestuff" )
//                                                              
// Compile time action:
//  The current input buffer is parsed for names up until a | followed by at least 
//   one delimiter is encountered. For each name found, a word with that name is
//   created in the locals wordlist and a call to >LOCALSL$ is compiled.
//
// Run time action:
//  Pops a string for each local lstring word defined and pushes it to the locals 
//   lstring stack.
//  This means the local lstring word names represent the string stack parameters in 
//   reverse order.
//
// Failure cases:
//  
// //////////////////////////////////////////////////////////////////////////////////////