Hey Uniface community! 👋 If you're still using the lowercase
statement in your Uniface applications, it's time for an important update. With AI assistance helping me structure this post, let's dive into why you should migrate to the newer $lowercase
function.
⚠️ What's Happening?
The lowercase
statement has been officially deprecated in Uniface 10.4. While it still works, it's been superseded by the more versatile $lowercase
function that works across all component types.
🔍 How the Old lowercase Statement Works
The traditional lowercase
statement follows this syntax:
lowercase Source, Target
Parameters:
- Source (String): Content to convert to lowercase
- Target (String): Destination of converted content
Example:
vString1 = "ABC"
lowercase vString1, vString2
; result: vString2 = "abc"
🆕 Why Switch to $lowercase?
The $lowercase
function offers several advantages:
- ✅ Universal compatibility: Works in all component types
- ✅ Modern approach: Follows current Uniface best practices
- ✅ Future-proof: Won't be removed in future versions
- ✅ Locale support: Better handling of locale-based processing rules
🔧 Migration Strategy
Converting your code is straightforward. Instead of:
lowercase vString1, vString2
Use:
vString2 = $lowercase(vString1)
⚡ Important Notes
- 🌐 Both methods perform Unicode-based character conversion
- 🏳️ The old
lowercase
statement doesn't apply locale-based processing rules - 🔄 If you need locale-specific processing,
$lowercase
is your best choice
🎯 Conclusion
While the deprecated lowercase
statement still functions, migrating to $lowercase
ensures your Uniface applications stay modern and maintainable. Start planning your migration today! 🚀
This post is based on the official Uniface 10.4 documentation.
What's your experience with this migration? Share your thoughts in the comments below! 💬