PN5_50516


Patch Number

Ticket Number

Change type

5_50516

na

Enhancement

1. Description

Allow SUBROUTINE names to be case insensitive.

1.1. Previous Release Behavior

The previous behavior had to rely on jFormatCode to normalize the SUBROUTINE line, but this couldn't help with indirect @calls, e.g.

001 SUBROUTINE mysub
002 CRT "The answer to Life, the Universe and Everything is 42."
003 RETURN

001 PROGRAM CALLMYSUB
subname = "MYSUB"
CALL @subname ;* this line would produce a runtime error

1.2. Current Release Behavior

A new Config_EMULATE option, compiler_case_insensitive_subroutines, can be set to activate this behavior.

compiler_case_insensitive_subroutines = true

When programs and subroutines are compiled (with BASIC, jcompile or within the jed editor), and this option in effect, a number of actions are performed to ensure case insensitivity works:

name = "SubName"
CALL @name  ;* i.e. changed at compile time to: CALL subname

The variable name is unaffected and will stay as SubName, but when looking for the subroutine it will look for subname.

The D3 emulation in Config_EMULATE now has compiler_case_insensitive_subroutines turned on by default.