SNOBOL4HOST(3)
π SNOBOL4HOST π
okay bestie, welcome to snobol4host β the CSNOBOL4 manual page that's all about the SNOBOL4 host O/S functions π₯οΈβ¨ this is the page that tells you everything the HOST() function can do, and girl, it can do a lot. fifty-something things. we're listing all of them. no skipping. periodt π
β¨ SYNOPSIS β¨
-INCLUDE 'host.sno'
yeah that's it, that's the whole vibe. drop that include and HOST() is yours π«Ά
πΈ DESCRIPTION πΈ
HOST() is giving swiss army knife energy β it wears a bunch of different hats depending on what you hand it. some of these come from Macro SPITBOL, some from Catspaw SPITBOL, and a whole pile are pure CSNOBOL4 exclusives. let's go group by group π
π§ Macro SPITBOL vibes
HOST()β returnsARCHITECTURE:OPERATING_SYSTEM:SNOBOL_VERSION. it's three parts glued together with colons: part one is the physical architecture, part two is the operating system, and part three is the language implementation's name plus version. NOTE! the architecture names come straight from theuname(3)library call, so the same physical hardware can report a different name when it's running a different operating system. iconic, honestly. examples:
amd64:FreeBSD 12.1-RELEASE-p1:CSNOBOL4B 2.2
x86_64:Linux 5.4.0-12-generic:CSNOBOL4B 2.2
HOST(0)β returns a string holding the command line parameter that got handed to the-uoption, if there even was one. and if nobody gave a-uoption? thenHOST(0)returns the concatenation of all the user parameters that follow the input filename(s) π«Ά
π± Catspaw SPITBOL vibes
HOST(1, string)β takes thatstringand passes it along to thesystem(3)C library function, then hands you back the subprocess exit status. so like,system()but make it SNOBOL π¦HOST(2, n)β for an integern, returns the n'th command line argument as a string β and it genuinely does not care whether that argument was the command name, an option, a filename, or a user parameter, it's coming back as a string regardless. ifnis out of range you get failure. πHOST(3)β returns an integer meant to be used withHOST(2), telling you which command line argument is the first one available as a user parameter. it's the little index buddy forHOST(2)π₯°HOST(4, I<string)β returns the value of the environment variable whose name is given bystring. yes, env vars, we love her π
π CSNOBOL4 exclusives
okay this is the long part, bestie, hydrate first π§ every single one of these is CSNOBOL4: flavored:
HOST(HOST_CONFIG_HOST)β returns host where configure script was runHOST(HOST_CONFIG_DATE)β returns date when configure script was runHOST(HOST_CONFIG_OPTIONS)β returns configure command line options (or fails)HOST(HOST_VERSION_DATE)β version date (from configure script)HOST(HOST_CC_IS)β C compiler name/idHOST(HOST_BUILD_DATE)β returns date when snobol4 builtHOST(HOST_BUILD_DIR)β returns directory where snobol4 builtHOST(HOST_BUILD_FILES)β returns named of files ued to build snobol4HOST(HOST_SNOLIB_DIR)β return default SNOLIB directory (for-INCLUDE,LOAD())HOST(HOST_SNOLIB_FILE)β return default file forLOAD()HOST(HOST_CC)β C Compiler used to build CSNOBOL4HOST(HOST_COPT)β C Compiler optimizer flags used to build CSNOBOL4HOST(HOST_SO_EXT)β Shared Object Library extensionHOST(HOST_SO_CFLAGS)β C Compiler flags for Shared ObjectsHOST(HOST_SO_LD)β Shared Object file load commandHOST(HOST_SO_LDFLAGS)β Shared Object file load switchesHOST(HOST_DL_EXT)β Dynamic Loadable Library extensionHOST(HOST_DL_CFLAGS)β C Compiler flags for Dynamic LoadablesHOST(HOST_DL_LD)β Dynamic Loadable file load commandHOST(HOST_DL_LDFLAGS)β Dynamic Loadable file load switchesHOST(HOST_DIR_SEP)β return system directory seperator character (may be empty)HOST(HOST_PATH_SEP)β return system PATH seperator characterHOST(HOST_DEF_SNOPATH)β default library search pathHOST(HOST_INCLUDE_DIR)β path for C headersHOST(HOST_OBJ_EXT)β object file extensionHOST(HOST_SETUP_SYS)β setuputil system nameHOST(HOST_SHARED_OBJ_SUBDIR)β shared object subdirHOST(HOST_CONFIG_CFLAGS)β CFLAGS from configureHOST(HOST_CONFIG_CPPFLAGS)β C preprocessor flags from configureHOST(HOST_CONFIG_LDFLAGS)β loader flags from configureHOST(HOST_INTEGER_BITS)β number of bits used to represent SNOBOL4 INTEGER typeHOST(HOST_REAL_BITS)β number of bits used to represent SNOBOL4 REAL typeHOST(HOST_POINTER_BITS)β number of bits used to represent C pointer typeHOST(HOST_LONG_BITS)β number of bits used to represent C long typeHOST(HOST_DESCR_BITS)β number of bits used to represent SIL "descriptor" typeHOST(HOST_SPEC_BITS)β number of bits used to represent SIL "specifier" typeHOST(HOST_CHAR_BITS)β number of bits used to represent C char typeHOST(HOST_DYNAMIC_SIZE)β size of "dynamic" storage in descriptorsHOST(HOST_PMSTACK_SIZE)β size of pattern match stack in descriptorsHOST(HOST_ISTACK_SIZE)β size of interpreter stack in descriptorsHOST(HOST_SNOLIB_BASE)β library base directory in useHOST(HOST_SNOLIB_LOCAL)β local, version-independant filesHOST(HOST_SNOLIB_VLIB)β distribution files (version-specific)HOST(HOST_SNOLIB_VLOCAL)β local, version-specific filesHOST(HOST_SNOPATH_DIR)β return n'th element in search directory listHOST(HOST_SNOLIB_VERS)β versioned base directory
and that's genuinely all of them β 52 ways to ask your own machine who it is π
π SEE ALSO π
and that's the page, bestie π go forth and interrogate your operating system, she loves it fr fr π
this was CSNOBOL4B 2.3.1, dated March 31, 2022 β mwah, take care of her π«Άβ¨πΈ
π¦ where this page comes from
- fedora 43: snobol4 2.3.1-7.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 43: snobol4 2.3.1-7.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 44: snobol4 2.3.1-8.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 44: snobol4 2.3.1-8.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms