HTDB : Docs : Designer's Guide : C-Functions
About
Overview
Philosophy
Features
News
Download
Help Us!

Docs
Overview
Designers
Language
Environment
C-Functions
Crypto
Date/Time
Numeric
Strings
HTML
HTDB
SQL
Debugging
System
User/Session
Credit Card
Misc.
S-Functions
Developers
Roadmap
Architecture

Community
Powered By

[home]
class: HTDB


${describe(object)}

used to display information about an active HTDB object. the single argument - object - is the name of an HTDB resource object: a compiled function, a scripted function, or a simple resource.

input

${describe(confUseCookieSessioning)}
yields
nameconfUseCookieSessioning
typeStatic Resource File Definition
bytes3
valueyes
 
notes a simple resource string definition. this particular value is defined in the master configuration file and controls whether or not cookies will be used. yup, folks, we're spying on you. delete your cookies, or we own you for life.

input

${describe(itor)}
yields
nameitor
typeCompiled Function
 
notes compiled functions may or may not accept arguments - a calling convention is not enforceable, so argument order and meaning will differ from function to function. rugged individualists BAH!
the point is - it is not possible to predictably describe the arguments into a compiled function, so all you get about this particular compiled function is what you see here.

input

${describe(describe)}
yields
namedescribe
typeCompiled Function
namedescribe
typeResource File Definition
bytes55
valuea careless script writer shadowed a built-in function..
 
notes this is an example where a user resource definition is shadowing a compiled function! (note that there are details for TWO types of objects above)

input

${describe(makeFont)}
yields
namemakeFont
typeResource File Script Function
usage${makeFont(color=..., face=..., size=...)}
bytes263
body<font
#live if (defined(func_makeFont->size))
  size="${func_makeFont->size}"
#live endif
#live if (defined(func_makeFont->color))
  color="${func_makeFont->color}"
#live endif
#live if (defined(func_makeFont->face))
  face="${func_makeFont->face}"
#live endif
 >
 
notes when the value is a script function or a user resource definition, the body of the definition will be displayed.

input

${describe(AnObjectWhichDoesNotExist)}
yields
nameAnObjectWhichDoesNotExist
typeUndefined
 


${indexOf(table, field, value)}


${idOf(table, field, value)}


${include(file)}


${inList(target, pattern1, pattern2, etc..)}

returns `pattern*' if `pattern*' is found within `target'

input

${inList(hello world, sex, hello, william)}
yieldshello  

input

${inList(hello world, wor)}
yieldswor  

input

${inList(hello world, 666)}
yields
FAILURE  


${makeArray(target, [separator,] string)}

input

${makeArray(out, , hello world)}
yields out[1] -> h
out[2] -> e
out[3] -> l
out[4] -> l
out[5] -> o
out[6] ->
out[7] -> w
out[8] -> o
out[9] -> r
out[10] -> l
out[11] -> d  
notes when used with an empty separator value, the string will be split character by character

input

${makeArray(out, l, hello world)}
yields out[1] -> he
out[2] ->
out[3] -> o wor
out[4] -> d  
notes note that the separator value is removed from the array

input

${makeArray(out, hello world)}
yields out[1] -> hello
out[2] -> world  
notes when used without a separator argument, the string is split on word boundaries

   
7,983 impressions