[Info-vax] Pascal question
John Reagan
xyzzy1959 at gmail.com
Wed Jan 23 12:36:38 EST 2019
On Wednesday, January 23, 2019 at 11:06:00 AM UTC-5, Brian_R wrote:
> On Wednesday, January 23, 2019 at 3:00:15 PM UTC, Arne Vajhøj wrote:
> > On 1/22/2019 2:58 AM, Brian_R wrote:
> > > On Tuesday, January 22, 2019 at 1:44:04 AM UTC, John Reagan wrote:
> > >> As for string manipulation, like upcase, it hasn't been a popular
> > >> request.
> > >
> > > Why would it be, its handled quite nicely by the OS libraries. I use
> > > VMS Pascal on a daily basis and we use STR$xxxxx for standard string
> > > handling.
> >
> > I still think builtin Pascal functions would be nicer.
> >
> > > Now additional routines (RTL preferred) for the manipulation of JSON
> > > structures might be a plan.
> >
> > Given that VMS Pascal AFAIK does not support any type of reflection,
> > then there are heavy constraints on what is possible.
> >
> > Do you basically just need a good parser that makes it easy to do:
> >
> > JSON string---(generic parser)--->generic data structure---(custom
> > code)--->custom data structure
>
> A generic parser would be fine. We effectively hand-rolled our own JSON-RPC interface using a standard C parser (called from Pascal) which returned a tree structure of json objects which we could iterate through using Pascal wrappers.
>
> LIB$FIND_IMAGE_SYMBOL was then used to find the RPC function in the library and the target Pascal routine called via LIB$CALLG. It worked and made it reasonably simple to extend, especially over the binary formats we'd been using previously.
>
> The list of available routines and their parameters was stashed in a JSON configuration file.
>
> >
> > ?
> > Arne
function types and function pointers is one of the missing pieces of Pascal that you get in C. I almost added them years ago about the time I moved over to NonStop.
More information about the Info-vax
mailing list