硬汉嵌入式论坛

 找回密码
 立即注册
查看: 21|回复: 1
收起左侧

[其它] lua 的print函数输出不了整数,可以输出浮点数据

[复制链接]

1

主题

1

回帖

4

积分

新手上路

积分
4
发表于 昨天 17:35 | 显示全部楼层 |阅读模式
请教下:STM32F429移植了LUA,使用lua的print函数不能输出整数,可以输出浮点数据,如:

    test=1234
    print("test int value", test)
    test=12.34
    print("test float value", test)

输出结果:



test int value        ld
test float value        12.34



回复

使用道具 举报

1万

主题

7万

回帖

11万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
115892
QQ
发表于 2 小时前 来自手机 | 显示全部楼层
使用string.format转换后输出正常吗
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2025-5-25 12:34 , Processed in 0.207711 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表