Flex supports a flexible import system that allows you to include external .lx or .flex files into your program. The language supports three equivalent import keywords:
geebgeepimport
All three serve the same purpose but reflect different syntax preferences to support Flex's bilingual design (Franco Arabic and English).
Use geeb when writing in Franco Arabic style.
Example:
# File: math_utils.lx
sando2 absolute(rakm a){
lw a < 0 {
x = a * (-1)
rg3 x
}
gher {
rg3 a
}
}# File: main.lx
geeb "path/to/math_utils.lx"
x = -400
positive = absolute(x)
etb3("{x} after absolute is {positive}")geep functions exactly like geeb and is interchangeable.
Example:
# File: main.lx
geep "path/to/math_utils.lx"
x = -400
positive = absolute(x)
etb3("{x} after absolute is {positive}")import is the English-style keyword, identical in functionality to geeb and geep.
Example:
# File: main.lx
import "path/to/math_utils.lx"
x = -400
positive = absolute(x)
etb3("{x} after absolute is {positive}")All three keywords (geeb, geep, import) are handled identically by the Flex parser. It looks for a string path following any of these keywords and loads the corresponding module.
Example usage from a real test file:
geeb "C:/Users/hp/Desktop/Github/Flex/Flex/src/flex_tester"
fo()
r = tmsss(3, 9)
etb3(r)- All three keywords are functionally identical.
- Use
geeborgeepfor Franco Arabic syntax. - Use
importfor standard English syntax. - This import flexibility is part of Flex’s design to support bilingual code and developer preference.